Skip to content
This repository has been archived by the owner on Sep 2, 2020. It is now read-only.

ImportError: cannot import name 'six' from 'django.utils' (/usr/local/lib/python3.8/site-packages/django/utils/__init__.py) #54

Open
ghost opened this issue Feb 27, 2020 · 1 comment

Comments

@ghost
Copy link

ghost commented Feb 27, 2020

django.utils module does not contains six anymore, as it was removed in Django 3.0 with all python 2 compatibility

abitour_django   | Traceback (most recent call last):
abitour_django   |   File "manage.py", line 21, in <module>
abitour_django   |     main()
abitour_django   |   File "manage.py", line 17, in main
abitour_django   |     execute_from_command_line(sys.argv)
abitour_django   |   File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
abitour_django   |     utility.execute()
abitour_django   |   File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 395, in execute
abitour_django   |     self.fetch_command(subcommand).run_from_argv(self.argv)
abitour_django   |   File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 328, in run_from_argv
abitour_django   |     self.execute(*args, **cmd_options)
abitour_django   |   File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 366, in execute
abitour_django   |     self.check()
abitour_django   |   File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 392, in check
abitour_django   |     all_issues = self._run_checks(
abitour_django   |   File "/usr/local/lib/python3.8/site-packages/django/core/management/commands/migrate.py", line 64, in _run_checks
abitour_django   |     issues.extend(super()._run_checks(**kwargs))
abitour_django   |   File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 382, in _run_checks
abitour_django   |     return checks.run_checks(**kwargs)
abitour_django   |   File "/usr/local/lib/python3.8/site-packages/django/core/checks/registry.py", line 72, in run_checks
abitour_django   |     new_errors = check(app_configs=app_configs)
abitour_django   |   File "/usr/local/lib/python3.8/site-packages/django/core/checks/urls.py", line 13, in check_url_config
abitour_django   |     return check_resolver(resolver)
abitour_django   |   File "/usr/local/lib/python3.8/site-packages/django/core/checks/urls.py", line 23, in check_resolver
abitour_django   |     return check_method()
abitour_django   |   File "/usr/local/lib/python3.8/site-packages/django/urls/resolvers.py", line 407, in check
abitour_django   |     for pattern in self.url_patterns:
abitour_django   |   File "/usr/local/lib/python3.8/site-packages/django/utils/functional.py", line 48, in __get__
abitour_django   |     res = instance.__dict__[self.name] = self.func(instance)
abitour_django   |   File "/usr/local/lib/python3.8/site-packages/django/urls/resolvers.py", line 588, in url_patterns
abitour_django   |     patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
abitour_django   |   File "/usr/local/lib/python3.8/site-packages/django/utils/functional.py", line 48, in __get__
abitour_django   |     res = instance.__dict__[self.name] = self.func(instance)
abitour_django   |   File "/usr/local/lib/python3.8/site-packages/django/urls/resolvers.py", line 581, in urlconf_module
abitour_django   |     return import_module(self.urlconf_name)
abitour_django   |   File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
abitour_django   |     return _bootstrap._gcd_import(name[level:], package, level)
abitour_django   |   File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
abitour_django   |   File "<frozen importlib._bootstrap>", line 991, in _find_and_load
abitour_django   |   File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
abitour_django   |   File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
abitour_django   |   File "<frozen importlib._bootstrap_external>", line 783, in exec_module
abitour_django   |   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
abitour_django   |   File "/backend/abitour/urls.py", line 42, in <module>
abitour_django   |     path('api/', include('request_app.urls')),
abitour_django   |   File "/usr/local/lib/python3.8/site-packages/django/urls/conf.py", line 34, in include
abitour_django   |     urlconf_module = import_module(urlconf_module)
abitour_django   |   File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
abitour_django   |     return _bootstrap._gcd_import(name[level:], package, level)
abitour_django   |   File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
abitour_django   |   File "<frozen importlib._bootstrap>", line 991, in _find_and_load
abitour_django   |   File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
abitour_django   |   File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
abitour_django   |   File "<frozen importlib._bootstrap_external>", line 783, in exec_module
abitour_django   |   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
abitour_django   |   File "/backend/request_app/urls.py", line 5, in <module>
abitour_django   |     from request_app import views
abitour_django   |   File "/backend/request_app/views.py", line 7, in <module>
abitour_django   |     from rest_framework_elasticsearch import es_views, es_filters
abitour_django   |   File "/usr/local/lib/python3.8/site-packages/rest_framework_elasticsearch/es_views.py", line 9, in <module>
abitour_django   |     from .es_filters import ElasticSearchFilter
abitour_django   |   File "/usr/local/lib/python3.8/site-packages/rest_framework_elasticsearch/es_filters.py", line 7, in <module>
abitour_django   |     from django.utils import six
abitour_django   | ImportError: cannot import name 'six' from 'django.utils' (/usr/local/lib/python3.8/site-packages/django/utils/__init__.py)
abitour_django exited with code 1
@josemlp91
Copy link

#56

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