MongoEngine / django-mongoengine

django mongoengine integration
Other
749 stars 208 forks source link

ModuleNotFoundError: No module named 'typing_extensions' #199

Closed rbtsolis closed 10 months ago

rbtsolis commented 10 months ago

Hello guys!

I found this package very interesting, and I started from scratch, and I found this:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/threading.py", line 1052, in _bootstrap_inner
    self.run()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/threading.py", line 989, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/rbtsolis/django/mongoengine/venv/lib/python3.12/site-packages/django/utils/autoreload.py", line 64, in wrapper
    fn(*args, **kwargs)
  File "/Users/rbtsolis/django/mongoengine/venv/lib/python3.12/site-packages/django/core/management/commands/runserver.py", line 125, in inner_run
    autoreload.raise_last_exception()
  File "/Users/rbtsolis/django/mongoengine/venv/lib/python3.12/site-packages/django/utils/autoreload.py", line 87, in raise_last_exception
    raise _exception[1]
  File "/Users/rbtsolis/django/mongoengine/venv/lib/python3.12/site-packages/django/core/management/__init__.py", line 394, in execute
    autoreload.check_errors(django.setup)()
  File "/Users/rbtsolis/django/mongoengine/venv/lib/python3.12/site-packages/django/utils/autoreload.py", line 64, in wrapper
    fn(*args, **kwargs)
  File "/Users/rbtsolis/django/mongoengine/venv/lib/python3.12/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/Users/rbtsolis/django/mongoengine/venv/lib/python3.12/site-packages/django/apps/registry.py", line 91, in populate
    app_config = AppConfig.create(entry)
                 ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/rbtsolis/django/mongoengine/venv/lib/python3.12/site-packages/django/apps/config.py", line 193, in create
    import_module(entry)
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1381, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1354, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1325, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 929, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 994, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/Users/rbtsolis/django/mongoengine/venv/lib/python3.12/site-packages/django_mongoengine/__init__.py", line 1, in <module>
    from .document import Document, DynamicDocument, DynamicEmbeddedDocument, EmbeddedDocument
  File "/Users/rbtsolis/django/mongoengine/venv/lib/python3.12/site-packages/django_mongoengine/document.py", line 14, in <module>
    from typing_extensions import Self
ModuleNotFoundError: No module named 'typing_extensions'

I think we can add a kind of requirements.txt or dependencies, just to do it easy, I can help with that, What do you think?

last-partizan commented 10 months ago

Hi, how are you installing your package?

last-partizan commented 10 months ago

Should be fixed in v0.5.7-beta.1

rbtsolis commented 10 months ago

Hi, how are you installing your package?

Using pip, and adding it to INSTALLED_APPS