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

no module named mongoenginie.django #4

Open
keder-code-hash opened this issue Jun 26, 2022 · 3 comments
Open

no module named mongoenginie.django #4

keder-code-hash opened this issue Jun 26, 2022 · 3 comments

Comments

@keder-code-hash
Copy link

Traceback (most recent call last):
  File "/media/keder/work_Projects/social_auth/testenv/lib/python3.8/site-packages/social_django_mongoengine/models.py", line 34, in _get_user_model
    from django_mongoengine.mongo_auth.models import get_user_document
ImportError: cannot import name 'get_user_document' from 'django_mongoengine.mongo_auth.models' (/media/keder/work_Projects/social_auth/testenv/lib/python3.8/site-packages/django_mongoengine/mongo_auth/models.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/media/keder/work_Projects/social_auth/testenv/lib/python3.8/site-packages/django/utils/autoreload.py", line 64, in wrapper
    fn(*args, **kwargs)
  File "/media/keder/work_Projects/social_auth/testenv/lib/python3.8/site-packages/django/core/management/commands/runserver.py", line 110, in inner_run
    autoreload.raise_last_exception()
  File "/media/keder/work_Projects/social_auth/testenv/lib/python3.8/site-packages/django/utils/autoreload.py", line 87, in raise_last_exception
    raise _exception[1]
  File "/media/keder/work_Projects/social_auth/testenv/lib/python3.8/site-packages/django/core/management/__init__.py", line 375, in execute
    autoreload.check_errors(django.setup)()
  File "/media/keder/work_Projects/social_auth/testenv/lib/python3.8/site-packages/django/utils/autoreload.py", line 64, in wrapper
    fn(*args, **kwargs)
  File "/media/keder/work_Projects/social_auth/testenv/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/media/keder/work_Projects/social_auth/testenv/lib/python3.8/site-packages/django/apps/registry.py", line 114, in populate
    app_config.import_models()
  File "/media/keder/work_Projects/social_auth/testenv/lib/python3.8/site-packages/django/apps/config.py", line 301, in import_models
    self.models_module = import_module(models_module_name)
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 848, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/media/keder/work_Projects/social_auth/testenv/lib/python3.8/site-packages/social_django_mongoengine/models.py", line 40, in <module>
    USER_MODEL = _get_user_model()
  File "/media/keder/work_Projects/social_auth/testenv/lib/python3.8/site-packages/social_django_mongoengine/models.py", line 37, in _get_user_model
    return module_member('mongoengine.django.auth.User')
  File "/media/keder/work_Projects/social_auth/testenv/lib/python3.8/site-packages/social_core/utils.py", line 59, in module_member
    module = import_module(mod)
  File "/media/keder/work_Projects/social_auth/testenv/lib/python3.8/site-packages/social_core/utils.py", line 53, in import_module
    __import__(name)
ModuleNotFoundError: No module named 'mongoengine.django'

@nijel nijel transferred this issue from python-social-auth/social-app-django Jun 27, 2022
@nijel
Copy link
Member

nijel commented Jun 27, 2022

ModuleNotFoundError: No module named 'mongoengine.django' - do you have mongoengine installed?

@keder-code-hash
Copy link
Author

Yes, I have installed pymongo.

pymongo==3.12.1
Django==3.1.14
social-auth-app-django==5.0.0
social-auth-app-django-mongoengine==1.0.0
social-auth-core==4.1.0
social-auth-storage-mongoengine==1.0.1

Is the current release dependent upon a specific version? Let me know.

@nijel
Copy link
Member

nijel commented Jun 28, 2022

It turns out that it needs some legacy version of mongoengine, see https://stackoverflow.com/q/35544605/225718 and http://docs.mongoengine.org/django.html. Probably this needs some updating...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants