Skip to content
This repository has been archived by the owner on Feb 19, 2021. It is now read-only.

ImportError: cannot import name 'FieldDoesNotExist' from 'django.db.models' in __init__.py #698

Open
amo13 opened this issue Sep 7, 2020 · 0 comments

Comments

@amo13
Copy link

amo13 commented Sep 7, 2020

sudo -u http python /usr/share/webapps/paperless/src/manage.py migrate
Traceback (most recent call last):
  File "/usr/share/webapps/paperless/src/manage.py", line 11, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/lib/python3.8/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
    utility.execute()
  File "/usr/lib/python3.8/site-packages/django/core/management/__init__.py", line 377, in execute
    django.setup()
  File "/usr/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/lib/python3.8/site-packages/django/apps/registry.py", line 122, in populate
    app_config.ready()
  File "/usr/lib/python3.8/site-packages/django/contrib/admin/apps.py", line 24, in ready
    self.module.autodiscover()
  File "/usr/lib/python3.8/site-packages/django/contrib/admin/__init__.py", line 24, in autodiscover
    autodiscover_modules('admin', register_to=site)
  File "/usr/lib/python3.8/site-packages/django/utils/module_loading.py", line 47, in autodiscover_modules
    import_module('%s.%s' % (app_config.name, module_to_search))
  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 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/share/webapps/paperless/src/documents/admin.py", line 14, in <module>
    from djangoql.admin import DjangoQLSearchMixin
  File "/usr/lib/python3.8/site-packages/djangoql/admin.py", line 13, in <module>
    from .queryset import apply_search
  File "/usr/lib/python3.8/site-packages/djangoql/queryset.py", line 5, in <module>
    from .schema import DjangoQLField, DjangoQLSchema
  File "/usr/lib/python3.8/site-packages/djangoql/schema.py", line 8, in <module>
    from django.db.models import FieldDoesNotExist, ManyToManyRel, ManyToOneRel
ImportError: cannot import name 'FieldDoesNotExist' from 'django.db.models' (/usr/lib/python3.8/site-packages/django/db/models/__init__.py)

I have looked for the import statement in that python file but couldn't find the culprit line. Is there anything I can do to fix the initial migration process?
Any help or advise is very welcome.

OS: Archlinux, installed from AUR

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

No branches or pull requests

1 participant