eve-val / evelink

Python bindings for the EVE API.
Other
91 stars 30 forks source link

EVECentral lib urllib2/urllib.request Py2/Py3 conversion incomplete #193

Closed cheezy52 closed 9 years ago

cheezy52 commented 9 years ago

When using the EVE Central third-party library, attempting to instantiate an EVECentral() object with no arguments leads to the error "NameError: global name 'urllib2' is not defined" at line 20 (elif urllib2 is not None, in the initialization, when attempting to set default fetch function).

This problem seems to occur because there are mixed references to urllib2 and urllib.request at different points in the code, possibly as the result of an incomplete conversion from one library to the other.

Workaround: Instantiate EVECentral() with a dummy function similar to the _default_fetch_func but using urllib2: def fetch_func(url): return urllib2.urlopen(url).read()

ayust commented 9 years ago

Fixed by #194.