question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ImportError: cannot import name IntEnum

See original GitHub issue
File "apnsClient.py", line 1, in <module>
    from hyper import HTTPConnection
  File "/usr/local/lib/python2.7/dist-packages/hyper/__init__.py", line 11, in <module>
    from .common.connection import HTTPConnection
  File "/usr/local/lib/python2.7/dist-packages/hyper/common/connection.py", line 10, in <module>
    from ..http20.connection import HTTP20Connection
  File "/usr/local/lib/python2.7/dist-packages/hyper/http20/connection.py", line 8, in <module>
    import h2.connection
  File "/usr/local/lib/python2.7/dist-packages/h2/connection.py", line 10, in <module>
    from enum import Enum, IntEnum
ImportError: cannot import name IntEnum

I am using Python 2.7.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
harry1064commented, Oct 8, 2016

pip install enum34 solved the above issue but now i am getting this

Traceback (most recent call last):
  File "apnsClient.py", line 1, in <module>
    from hyper import HTTPConnection
  File "/usr/local/lib/python2.7/dist-packages/hyper/__init__.py", line 11, in <module>
    from .common.connection import HTTPConnection
  File "/usr/local/lib/python2.7/dist-packages/hyper/common/connection.py", line 10, in <module>
    from ..http20.connection import HTTP20Connection
  File "/usr/local/lib/python2.7/dist-packages/hyper/http20/connection.py", line 35, in <module>
    TRANSIENT_SSL_ERRORS = (ssl.SSL_ERROR_WANT_READ, ssl.SSL_ERROR_WANT_WRITE)
AttributeError: 'NoneType' object has no attribute 'SSL_ERROR_WANT_READ'
1reaction
alexwlchancommented, Oct 8, 2016

Hmm. At a glance, I’d guess you have the wrong version of enum34, or maybe an entirely different package that also has the name enum.

Could you post the output of pip freeze please?

Read more comments on GitHub >

github_iconTop Results From Across the Web

ImportError: cannot import name 'IntEnum' - Stack Overflow
I am trying to install upstox , which is a Python API for connecting to market data. I am unable to install it...
Read more >
ImportError: cannot import name IntEnum · Issue #351 - GitHub
I am using Python 2.7. The text was updated successfully, but these errors were encountered: ...
Read more >
How to fix Python ImportError: cannot import name 'enum'
The enum module is only available in Python 3, but you are using Python 2! After installing this, the ImportError should disappear.
Read more >
Python – ImportError: cannot import name 'IntEnum' - iTecNote
Python – ImportError: cannot import name 'IntEnum'. packagespippythonpython-3.x. I am trying to install upstox , which is a Python API for connecting to ......
Read more >
Re: 3.4 on Windows ImportError: cannot import name 'IntEnum'
On 04/01/2014 19:35, Mark Lawrence wrote: Raised an issue anyway and then found a file caused enum.py. Whoops :( -- My fellow Pythonistas,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found