-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImportError: cannot import name exceptions since 1.3 #65
Comments
Which version of Python are you using?
|
2.7 |
Ah should have seen it in the path. I'm having trouble reproducing it though...
Any ideas? |
Ah, just noticed you meant the error happens on import, not install. Checking. |
Hmm, seems to work during import too: $ python
Python 2.7.2 (default, Dec 16 2011, 19:20:09)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from urllib3 import HTTPSConnectionPool
>>> import urllib3
>>> urllib3.exceptions
<module 'urllib3.exceptions' from '/Users/shazow/env/urllib3/lib/python2.7/site-packages/urllib3-1.3-py2.7.egg/urllib3/exceptions.pyc'>
>>> |
oh i know, i check this but with version 1.2.2 this will be fine |
Ah, that is indeed a problem. Any interest in fixing it? :) I was hoping to have exceptions available under |
ok i'll try to do this |
clj@clj-laptop:~/dev$ sudo easy_install urllib3==1.2.2 Using /usr/local/lib/python2.7/dist-packages/urllib3-1.2.2-py2.7.egg
after viewing the source code of eventlet if you have times, you can check this if you find what causes this, |
urllib3 version 1.2.2 Python 2.7.2+ (default, Oct 4 2011, 20:03:08)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import eventlet
>>> urllib3 = eventlet.import_patched('urllib3')
>>> dir(urllib3)
['HTTPConnectionPool', 'HTTPError', 'HTTPResponse', 'HTTPSConnectionPool', 'MaxRetryError', 'PoolManager', 'ProxyManager', 'SSLError', 'TimeoutError', '__author__', '__builtins__', '__doc__', '__file__', '__license__', '__name__', '__package__', '__path__', '__version__', '_collections', 'connection_from_url', 'connectionpool', 'encode_multipart_formdata', 'exceptions', 'filepost', 'get_host', 'make_headers', 'packages', 'poolmanager', 'proxy_from_url', 'request', 'response']
>>> import urllib3
>>> dir(urllib3)
['HTTPConnectionPool', 'HTTPError', 'HTTPResponse', 'HTTPSConnectionPool', 'MaxRetryError', 'PoolManager', 'ProxyManager', 'SSLError', 'TimeoutError', '__author__', '__builtins__', '__doc__', '__file__', '__license__', '__name__', '__package__', '__path__', '__version__', 'connection_from_url', 'encode_multipart_formdata', 'get_host', 'make_headers', 'proxy_from_url'] after import urllib3 |
Hmm, here's the set difference: ['_collections',
'request',
'connectionpool',
'filepost',
'poolmanager',
'exceptions',
'packages',
'response'] |
it's not necessary to use eventlet.import_patched('urllib3')(but the bug is existed exactly) |
from urllib3 import HTTPSConnectionPool
File "/usr/local/lib/python2.7/dist-packages/urllib3-1.3-py2.7.egg/urllib3/init.py", line 22, in
from . import exceptions
ImportError: cannot import name exceptions
with easy_install
The text was updated successfully, but these errors were encountered: