burke-software / django-mass-edit

Make bulk changes in the Django admin interface
152 stars 67 forks source link

Error with 3.3.0 release using Django 1.11 #95

Closed gamesbook closed 2 years ago

gamesbook commented 2 years ago

I get the following error:

Traceback (most recent call last):
  File "manage.py", line 13, in <module>
    execute_from_command_line(args)
  File "/home/gamesbook/miniconda3/envs/tp3/lib/python3.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/home/gamesbook/miniconda3/envs/tp3/lib/python3.7/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/gamesbook/miniconda3/envs/tp3/lib/python3.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/gamesbook/miniconda3/envs/tp3/lib/python3.7/site-packages/django/core/management/commands/runserver.py", line 61, in execute
    super(Command, self).execute(*args, **options)
  File "/home/gamesbook/miniconda3/envs/tp3/lib/python3.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/home/gamesbook/miniconda3/envs/tp3/lib/python3.7/site-packages/django/core/management/commands/runserver.py", line 100, in handle
    self.run(**options)
  File "/home/gamesbook/miniconda3/envs/tp3/lib/python3.7/site-packages/django/core/management/commands/runserver.py", line 111, in run
    self.inner_run(None, **options)
  File "/home/gamesbook/miniconda3/envs/tp3/lib/python3.7/site-packages/django/core/management/commands/runserver.py", line 124, in inner_run
    self.check(display_num_errors=True)
  File "/home/gamesbook/miniconda3/envs/tp3/lib/python3.7/site-packages/django/core/management/base.py", line 359, in check
    include_deployment_checks=include_deployment_checks,
  File "/home/gamesbook/miniconda3/envs/tp3/lib/python3.7/site-packages/django/core/management/base.py", line 346, in _run_checks
    return checks.run_checks(**kwargs)
  File "/home/gamesbook/miniconda3/envs/tp3/lib/python3.7/site-packages/django/core/checks/registry.py", line 81, in run_checks
    new_errors = check(app_configs=app_configs)
  File "/home/gamesbook/miniconda3/envs/tp3/lib/python3.7/site-packages/django/core/checks/urls.py", line 16, in check_url_config
    return check_resolver(resolver)
  File "/home/gamesbook/miniconda3/envs/tp3/lib/python3.7/site-packages/django/core/checks/urls.py", line 26, in check_resolver
    return check_method()
  File "/home/gamesbook/miniconda3/envs/tp3/lib/python3.7/site-packages/django/urls/resolvers.py", line 256, in check
    for pattern in self.url_patterns:
  File "/home/gamesbook/miniconda3/envs/tp3/lib/python3.7/site-packages/django/utils/functional.py", line 35, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/home/gamesbook/miniconda3/envs/tp3/lib/python3.7/site-packages/django/urls/resolvers.py", line 407, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "/home/gamesbook/miniconda3/envs/tp3/lib/python3.7/site-packages/django/utils/functional.py", line 35, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/home/gamesbook/miniconda3/envs/tp3/lib/python3.7/site-packages/django/urls/resolvers.py", line 400, in urlconf_module
    return import_module(self.urlconf_name)
  File "/home/gamesbook/miniconda3/envs/tp3/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/gamesbook/Projects/Personal/cbi/myproject/code/myproject/urls.py", line 29, in <module>
    url(r'^', include('massadmin.urls'), kwargs={'admin_site': admin.site}),
  File "/home/gamesbook/miniconda3/envs/tp3/lib/python3.7/site-packages/django/conf/urls/__init__.py", line 50, in include
    urlconf_module = import_module(urlconf_module)
  File "/home/gamesbook/miniconda3/envs/tp3/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/gamesbook/miniconda3/envs/tp3/lib/python3.7/site-packages/massadmin/urls.py", line 1, in <module>
    from django.urls import re_path
ImportError: cannot import name 're_path' from 'django.urls' (/home/gamesbook/miniconda3/envs/tp3/lib/python3.7/site-packages/django/urls/__init__.py)
PetrDlouhy commented 2 years ago

@gamesbook Support for Django 1.11 ended in April of 2020. This error is caused by usage of re_path which was introduced in newer versions of Django. I am closing this issue, because the new version dropped support of the older Django versions. You can still use version 3.2.0.

gamesbook commented 2 years ago

I guessed it was that - its just hard to see from pypi which version supports which version of Django.

I need the newer features, so will need to plan to upgrade Django.