Answer the question
In order to leave comments, you need to log in
How to remove error when importing Flask-OpenID module, python3?
Hello, I'm trying to import a module, but it throws an error:
In[17]: from flask.ext.openid import OpenID
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/IPython/core/interactiveshell.py", line 2821, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-17-f6203321d602>", line 1, in <module>
from flask.ext.openid import OpenID
File "/opt/pycharm/helpers/pydev/pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "<frozen importlib._bootstrap>", line 2214, in _find_and_load
File "<frozen importlib._bootstrap>", line 2203, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 1191, in _load_unlocked
File "<frozen importlib._bootstrap>", line 1161, in _load_backward_compatible
File "/usr/local/lib/python3.4/dist-packages/flask/exthook.py", line 62, in load_module
__import__(realname)
File "/opt/pycharm/helpers/pydev/pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/flask_openid.py", line 25, in <module>
from openid.store.filestore import FileOpenIDStore
File "/opt/pycharm/helpers/pydev/pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "/opt/pycharm/helpers/pydev/pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "/opt/pycharm/helpers/pydev/pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/openid/__init__.py", line 52, in <module>
if len(version_info) != 3:
TypeError: object of type 'map' has no len()
__version__ = '[library version:2.2.1]'[17:-1]
....
....
# Parse the version info
try:
version_info = map(int, __version__.split('.'))
except ValueError:
version_info = (None, None, None)
else:
if len(version_info) != 3:
version_info = (None, None, None)
else:
version_info = tuple(version_info)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question