ecommerce-backend icon indicating copy to clipboard operation
ecommerce-backend copied to clipboard

Error when migrate

Open paulocoutinhox opened this issue 1 year ago • 3 comments

python3 manage.py migrate --settings=src.settings.local Traceback (most recent call last): File "/Users/paulo/Developer/workspaces/python/ecommerce-backend/accounts/api/serializers.py", line 8, in from allauth.utils import email_address_exists ImportError: cannot import name 'email_address_exists' from 'allauth.utils' (/Users/paulo/Library/Python/3.9/lib/python/site-packages/allauth/utils.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/paulo/Developer/workspaces/python/ecommerce-backend/manage.py", line 15, in execute_from_command_line(sys.argv) File "/Users/paulo/Library/Python/3.9/lib/python/site-packages/django/core/management/init.py", line 419, in execute_from_command_line utility.execute() File "/Users/paulo/Library/Python/3.9/lib/python/site-packages/django/core/management/init.py", line 413, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/Users/paulo/Library/Python/3.9/lib/python/site-packages/django/core/management/base.py", line 354, in run_from_argv self.execute(*args, **cmd_options) File "/Users/paulo/Library/Python/3.9/lib/python/site-packages/django/core/management/base.py", line 398, in execute output = self.handle(*args, **options) File "/Users/paulo/Library/Python/3.9/lib/python/site-packages/django/core/management/base.py", line 89, in wrapped res = handle_func(*args, **kwargs) File "/Users/paulo/Library/Python/3.9/lib/python/site-packages/django/core/management/commands/migrate.py", line 75, in handle self.check(databases=[database]) File "/Users/paulo/Library/Python/3.9/lib/python/site-packages/django/core/management/base.py", line 419, in check all_issues = checks.run_checks( File "/Users/paulo/Library/Python/3.9/lib/python/site-packages/django/core/checks/registry.py", line 76, in run_checks new_errors = check(app_configs=app_configs, databases=databases) File "/Users/paulo/Library/Python/3.9/lib/python/site-packages/django/core/checks/urls.py", line 40, in check_url_namespaces_unique all_namespaces = _load_all_namespaces(resolver) File "/Users/paulo/Library/Python/3.9/lib/python/site-packages/django/core/checks/urls.py", line 57, in _load_all_namespaces url_patterns = getattr(resolver, 'url_patterns', []) File "/Users/paulo/Library/Python/3.9/lib/python/site-packages/django/utils/functional.py", line 48, in get res = instance.dict[self.name] = self.func(instance) File "/Users/paulo/Library/Python/3.9/lib/python/site-packages/django/urls/resolvers.py", line 602, in url_patterns patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) File "/Users/paulo/Library/Python/3.9/lib/python/site-packages/django/utils/functional.py", line 48, in get res = instance.dict[self.name] = self.func(instance) File "/Users/paulo/Library/Python/3.9/lib/python/site-packages/django/urls/resolvers.py", line 595, in urlconf_module return import_module(self.urlconf_name) File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "", line 850, in exec_module File "", line 228, in _call_with_frames_removed File "/Users/paulo/Developer/workspaces/python/ecommerce-backend/src/urls.py", line 24, in path("api/", include("api.urls")), File "/Users/paulo/Library/Python/3.9/lib/python/site-packages/django/urls/conf.py", line 34, in include urlconf_module = import_module(urlconf_module) File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "", line 850, in exec_module File "", line 228, in _call_with_frames_removed File "/Users/paulo/Developer/workspaces/python/ecommerce-backend/api/urls.py", line 4, in path("accounts/", include("accounts.api.urls")), File "/Users/paulo/Library/Python/3.9/lib/python/site-packages/django/urls/conf.py", line 34, in include urlconf_module = import_module(urlconf_module) File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "", line 850, in exec_module File "", line 228, in _call_with_frames_removed File "/Users/paulo/Developer/workspaces/python/ecommerce-backend/accounts/api/urls.py", line 3, in from .views import CustomRegisterView File "/Users/paulo/Developer/workspaces/python/ecommerce-backend/accounts/api/views.py", line 1, in from rest_auth.registration.views import RegisterView File "/Users/paulo/Library/Python/3.9/lib/python/site-packages/rest_auth/registration/views.py", line 22, in from rest_auth.app_settings import (TokenSerializer, File "/Users/paulo/Library/Python/3.9/lib/python/site-packages/rest_auth/app_settings.py", line 24, in UserDetailsSerializer = import_callable( File "/Users/paulo/Library/Python/3.9/lib/python/site-packages/rest_auth/utils.py", line 11, in import_callable return getattr(import_module(package), attr) File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "/Users/paulo/Developer/workspaces/python/ecommerce-backend/accounts/api/serializers.py", line 10, in raise ImportError("allauth needs to be added to INSTALLED_APPS.") ImportError: allauth needs to be added to INSTALLED_APPS.

paulocoutinhox avatar Aug 26 '23 06:08 paulocoutinhox