Skip to content

Fixed import error in Python 3#7

Open
htmlboss wants to merge 1 commit intoshabble:masterfrom
DFO-Ocean-Navigator:master
Open

Fixed import error in Python 3#7
htmlboss wants to merge 1 commit intoshabble:masterfrom
DFO-Ocean-Navigator:master

Conversation

@htmlboss
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown

@zhenyuan992 zhenyuan992 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

name errors will occur.

Line 100 fileobject = urllib2.urlopen(uri)

import os
import urllib2
try:
import urllib2
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will cause line 27 to have a name error because of urlopen.
use from urllib2 import urlopen instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants