You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the danger of duplicating #209, I would like to report an issue w.r.t. the installation order of the rosetta and django-rosetta packages. When rosetta is installed afterdjango-rosetta, rosetta overrides the rosetta/__init__.py of django-rosetta, causing an ImportError on the get_version function in Django. Pipenv regularly installs rosetta and django-rosetta in the wrong order.
django version: 2.1.9
django-rosetta version: 0.9.3
python version: 3.7.3
pipenv version: 2018.11.15.dev0
Stacktrace
Traceback (most recent call last):
File "manage.py", line 15, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python3.7/site-packages/django/core/management/commands/test.py", line 26, in run_from_argv
super().run_from_argv(argv)
File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 316, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 353, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python3.7/site-packages/django/core/management/commands/test.py", line 56, in handle
failures = test_runner.run_tests(test_labels)
File "/usr/local/lib/python3.7/site-packages/django/test/runner.py", line 605, in run_tests
self.run_checks()
File "/usr/local/lib/python3.7/site-packages/django/test/runner.py", line 567, in run_checks
call_command('check', verbosity=self.verbosity)
File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 148, in call_command
return command.execute(*args, **defaults)
File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 353, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python3.7/site-packages/django/core/management/commands/check.py", line 65, in handle
fail_level=getattr(checks, options['fail_level']),
File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 379, in check
include_deployment_checks=include_deployment_checks,
File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 366, in _run_checks
return checks.run_checks(**kwargs)
File "/usr/local/lib/python3.7/site-packages/django/core/checks/registry.py", line 71, in run_checks
new_errors = check(app_configs=app_configs)
File "/usr/local/lib/python3.7/site-packages/django/core/checks/urls.py", line 40, in check_url_namespaces_unique
all_namespaces = _load_all_namespaces(resolver)
File "/usr/local/lib/python3.7/site-packages/django/core/checks/urls.py", line 57, in _load_all_namespaces
url_patterns = getattr(resolver, 'url_patterns', [])
File "/usr/local/lib/python3.7/site-packages/django/utils/functional.py", line 37, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/usr/local/lib/python3.7/site-packages/django/urls/resolvers.py", line 533, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/usr/local/lib/python3.7/site-packages/django/utils/functional.py", line 37, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/usr/local/lib/python3.7/site-packages/django/urls/resolvers.py", line 526, in urlconf_module
return import_module(self.urlconf_name)
File "/usr/local/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 "/builds/www/steambird/steambird/urls.py", line 31, in <module>
path('translations/', include('rosetta.urls'))
File "/usr/local/lib/python3.7/site-packages/django/urls/conf.py", line 34, in include
urlconf_module = import_module(urlconf_module)
File "/usr/local/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 "/usr/local/lib/python3.7/site-packages/rosetta/urls.py", line 5, in <module>
from . import views
File "/usr/local/lib/python3.7/site-packages/rosetta/views.py", line 32, in <module>
from . import get_version as get_rosetta_version
ImportError: cannot import name 'get_version' from 'rosetta' (/usr/local/lib/python3.7/site-packages/rosetta/__init__.py)
The text was updated successfully, but these errors were encountered:
Thank you for reporting this… but I'm not sure I understand. Under which circumstances are you going to install both django-rosetta and rosetta? I.e. the "normal" use case is to install the former via e.g. pip install django-rosetta, how / when would you want to install rosetta directly?
With the danger of duplicating #209, I would like to report an issue w.r.t. the installation order of the
rosetta
anddjango-rosetta
packages. Whenrosetta
is installed afterdjango-rosetta
,rosetta
overrides therosetta/__init__.py
ofdjango-rosetta
, causing anImportError
on theget_version
function in Django. Pipenv regularly installsrosetta
anddjango-rosetta
in the wrong order.django
version:2.1.9
django-rosetta
version:0.9.3
python
version:3.7.3
pipenv
version:2018.11.15.dev0
Stacktrace
The text was updated successfully, but these errors were encountered: