Skip to content
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 'update_wrapper' #35

Open
hhstore opened this issue Dec 30, 2015 · 1 comment
Open

ImportError: cannot import name 'update_wrapper' #35

hhstore opened this issue Dec 30, 2015 · 1 comment

Comments

@hhstore
Copy link

hhstore commented Dec 30, 2015

my project env:

python 3.4.3

Django (1.7.4)
mongoadmin (0.2)
mongodbforms (0.3)
mongoengine (0.10.0)
pymongo (3.1)

when i add mongoadmin into settings.py,

INSTALLED_APPS = (
    'mongoadmin',
    'django.contrib.admin',
)

and run: python3 manage.py runserver 0.0.0.0:8000

it happens an error:

Traceback (most recent call last):
  File "manage.py", line 20, in <module>
    execute_from_command_line(sys.argv)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
    utility.execute()
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/django/core/management/__init__.py", line 354, in execute
    django.setup()
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/django/__init__.py", line 21, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/django/apps/registry.py", line 85, in populate
    app_config = AppConfig.create(entry)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/django/apps/config.py", line 87, in create
    module = import_module(entry)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/importlib/__init__.py", line 109, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1129, in _exec
  File "<frozen importlib._bootstrap>", line 1471, in exec_module
  File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/mongoadmin/__init__.py", line 1, in <module>
    from .options import *
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/mongoadmin/options.py", line 26, in <module>
    from django.utils.functional import update_wrapper
ImportError: cannot import name 'update_wrapper'

just add the module, not use it.

if I delete the module, run OK.

so, i think it is a bug.

@hhstore
Copy link
Author

hhstore commented Jan 4, 2016

i find a similar issue.

kezabelle/django-haystackbrowser#5

  • here says django 1.6+, not support.
  • I switch to django 1.5.12, the django-mongoadmin is work now.
  • but, i think this issue still need to be fix.

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

No branches or pull requests

1 participant