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

运行报错 #53

Open
Roclyt opened this issue Dec 20, 2023 · 1 comment
Open

运行报错 #53

Roclyt opened this issue Dec 20, 2023 · 1 comment

Comments

@Roclyt
Copy link

Roclyt commented Dec 20, 2023

Traceback (most recent call last):
File "D:\Python\lib\threading.py", line 1009, in _bootstrap_inner
self.run()
File "D:\Python\lib\threading.py", line 946, in run
self._target(*self._args, **self.kwargs)
File "D:\pyVE\venv2\lib\site-packages\django\utils\autoreload.py", line 64, in wrapper
fn(*args, **kwargs)
File "D:\pyVE\venv2\lib\site-packages\django\core\management\commands\runserver.py", line 133, in inner_run
self.check(display_num_errors=True)
File "D:\pyVE\venv2\lib\site-packages\django\core\management\base.py", line 485, in check
all_issues = checks.run_checks(
File "D:\pyVE\venv2\lib\site-packages\django\core\checks\registry.py", line 88, in run_checks
new_errors = check(app_configs=app_configs, databases=databases)
File "D:\pyVE\venv2\lib\site-packages\django\core\checks\urls.py", line 14, in check_url_config
return check_resolver(resolver)
File "D:\pyVE\venv2\lib\site-packages\django\core\checks\urls.py", line 24, in check_resolver
return check_method()
File "D:\pyVE\venv2\lib\site-packages\django\urls\resolvers.py", line 494, in check
for pattern in self.url_patterns:
File "D:\pyVE\venv2\lib\site-packages\django\utils\functional.py", line 57, in get
res = instance.dict[self.name] = self.func(instance)
File "D:\pyVE\venv2\lib\site-packages\django\urls\resolvers.py", line 715, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "D:\pyVE\venv2\lib\site-packages\django\utils\functional.py", line 57, in get
res = instance.dict[self.name] = self.func(instance)
File "D:\pyVE\venv2\lib\site-packages\django\urls\resolvers.py", line 708, in urlconf_module
return import_module(self.urlconf_name)
File "D:\Python\lib\importlib_init
.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "D:\PythonProject\bookstore\bookstore\urls.py", line 23, in
from books.views import BooksListViewSet
File "D:\PythonProject\bookstore\books\views.py", line 9, in
from rest_framework_jwt.authentication import JSONWebTokenAuthentication
File "D:\pyVE\venv2\lib\site-packages\rest_framework_jwt\authentication.py", line 4, in
from django.utils.encoding import smart_text
ImportError: cannot import name 'smart_text' from 'django.utils.encoding' (D:\pyVE\venv2\lib\site-packages\django\utils\encoding.py)

@JiaxingZhao
Copy link
Contributor

@Roclyt try downgrade django version , smart_text is removed from django 4.x
https://stackoverflow.com/questions/71589827/i-have-an-error-about-smart-text-after-installing-django-admin-charts

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