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

Compability issue with Django 4.0+ #13

Open
ArneFallisch opened this issue Dec 5, 2023 · 1 comment
Open

Compability issue with Django 4.0+ #13

ArneFallisch opened this issue Dec 5, 2023 · 1 comment

Comments

@ArneFallisch
Copy link

ArneFallisch commented Dec 5, 2023

I use omero-web 5.22.1 and omero-forms 1.1.0. After updating Django to a version 4.0+ and restarting of OMERO.web is generates the following error:

Traceback (most recent call last):
  File "manage.py", line 81, in <module>
    execute_from_command_line(sys.argv)
  File "/opt/omero/web/venv3/lib/python3.8/site-packages/django/core/management/__init__.py", line 425, in execute_from_command_line
    utility.execute()
  File "/opt/omero/web/venv3/lib/python3.8/site-packages/django/core/management/__init__.py", line 419, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/opt/omero/web/venv3/lib/python3.8/site-packages/django/core/management/base.py", line 373, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/opt/omero/web/venv3/lib/python3.8/site-packages/django/core/management/base.py", line 412, in execute
    self.check()
  File "/opt/omero/web/venv3/lib/python3.8/site-packages/django/core/management/base.py", line 438, in check
    all_issues = checks.run_checks(
  File "/opt/omero/web/venv3/lib/python3.8/site-packages/django/core/checks/registry.py", line 77, in run_checks
    new_errors = check(app_configs=app_configs, databases=databases)
  File "/opt/omero/web/venv3/lib/python3.8/site-packages/django/core/checks/urls.py", line 13, in check_url_config
    return check_resolver(resolver)
  File "/opt/omero/web/venv3/lib/python3.8/site-packages/django/core/checks/urls.py", line 23, in check_resolver
    return check_method()
  File "/opt/omero/web/venv3/lib/python3.8/site-packages/django/urls/resolvers.py", line 446, in check
    for pattern in self.url_patterns:
  File "/opt/omero/web/venv3/lib/python3.8/site-packages/django/utils/functional.py", line 48, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/opt/omero/web/venv3/lib/python3.8/site-packages/django/urls/resolvers.py", line 632, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "/opt/omero/web/venv3/lib/python3.8/site-packages/django/utils/functional.py", line 48, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/opt/omero/web/venv3/lib/python3.8/site-packages/django/urls/resolvers.py", line 625, in urlconf_module
    return import_module(self.urlconf_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 "/opt/omero/web/venv3/lib/python3.8/site-packages/omeroweb/urls.py", line 99, in <module>
    __import__(urlmodule)
  File "/opt/omero/web/venv3/lib/python3.8/site-packages/omero_forms/urls.py", line 1, in <module>
    from django.conf.urls import url
ImportError: cannot import name 'url' from 'django.conf.urls' (/opt/omero/web/venv3/lib/python3.8/site-packages/django/conf/urls/__init__.py)

As django.conf.urls.url() was deprecated it was removed in Django 4.0+ and cannot be used anymore. It is announced that Django 4.2 will be required in the next minor release of omero-web.
There is already a pull request:
#11

@JensWendt
Copy link

Also ran into this problem, would love to see it fixed for the "normal" user.
Bump

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

2 participants