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
Operating System: Windows10 (Microsoft Windows [Version 10.0.19042.1415])
You may know this problem but I report this just in case.
I was trying to implement the example, I followed the instructions of "django_private_chat2/example/README.md5". In step5, I tried to apply migrations but an exception occurred.
Here's an error message:
ImportError: cannot import name 'url' from 'django.conf.urls'
I tried Django Version 3.2.10, it went well. All worked.
What I Did
Applied migrations on Django 4.0 (Failed)
Applied migrations on Django 3.2.10 (Success)
Traceback (most recent call last):
(venv) C:\Programming\Codes\Django Project\OCoWa_PoC\django_private_chat2-master_debug>python manage.py migrate
Traceback (most recent call last):
File "C:\Programming\Codes\Django Project\OCoWa_PoC\django_private_chat2-master_debug\manage.py", line 12, in <module>
execute_from_command_line(sys.argv)
File "C:\Programming\Codes\Django Project\OCoWa_PoC\chat\venv\lib\site-packages\django\core\management\__init__.py", line 425, in execute_from_command_line
utility.execute()
File "C:\Programming\Codes\Django Project\OCoWa_PoC\chat\venv\lib\site-packages\django\core\management\__init__.py", line 419, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Programming\Codes\Django Project\OCoWa_PoC\chat\venv\lib\site-packages\django\core\management\base.py", line 373, in run_from_argv
self.execute(*args, **cmd_options)
File "C:\Programming\Codes\Django Project\OCoWa_PoC\chat\venv\lib\site-packages\django\core\management\base.py", line 417, in execute
output = self.handle(*args, **options)
File "C:\Programming\Codes\Django Project\OCoWa_PoC\chat\venv\lib\site-packages\django\core\management\base.py", line 90, in wrapped
res = handle_func(*args, **kwargs)
File "C:\Programming\Codes\Django Project\OCoWa_PoC\chat\venv\lib\site-packages\django\core\management\commands\migrate.py", line 75, in handle
self.check(databases=[database])
File "C:\Programming\Codes\Django Project\OCoWa_PoC\chat\venv\lib\site-packages\django\core\management\base.py", line 438, in check
all_issues = checks.run_checks(
File "C:\Programming\Codes\Django Project\OCoWa_PoC\chat\venv\lib\site-packages\django\core\checks\registry.py", line 77, in run_checks
new_errors = check(app_configs=app_configs, databases=databases)
File "C:\Programming\Codes\Django Project\OCoWa_PoC\chat\venv\lib\site-packages\django\core\checks\urls.py", line 13, in check_url_config
return check_resolver(resolver)
File "C:\Programming\Codes\Django Project\OCoWa_PoC\chat\venv\lib\site-packages\django\core\checks\urls.py", line 23, in check_resolver
return check_method()
File "C:\Programming\Codes\Django Project\OCoWa_PoC\chat\venv\lib\site-packages\django\urls\resolvers.py", line 446, in check
for pattern in self.url_patterns:
File "C:\Programming\Codes\Django Project\OCoWa_PoC\chat\venv\lib\site-packages\django\utils\functional.py", line 48, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "C:\Programming\Codes\Django Project\OCoWa_PoC\chat\venv\lib\site-packages\django\urls\resolvers.py", line 632, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "C:\Programming\Codes\Django Project\OCoWa_PoC\chat\venv\lib\site-packages\django\utils\functional.py", line 48, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "C:\Programming\Codes\Django Project\OCoWa_PoC\chat\venv\lib\site-packages\django\urls\resolvers.py", line 625, in urlconf_module
return import_module(self.urlconf_name)
File "C:\Users\n1312\AppData\Local\Programs\Python\Python39\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "C:\Programming\Codes\Django Project\OCoWa_PoC\django_private_chat2-master_debug\example\urls.py", line 4, in <module>
from django.conf.urls import url, include
ImportError: cannot import name 'url' from 'django.conf.urls' (C:\Programming\Codes\Django Project\OCoWa_PoC\chat\venv\lib\site-packages\django\conf\urls\__init__.py)
I'm very new to Programming and OSS Dev so I don't know this will help or not but I just report this.
This is what I was looking for! You guys doing a great job. Big thanks from the far east.
The text was updated successfully, but these errors were encountered:
Hello, this might be the issue with the example because it wasn't updated to support Django 4.0 (as opposed to the package itself)
I hope to have the time to fix it soon
You may know this problem but I report this just in case.
I was trying to implement the example, I followed the instructions of "django_private_chat2/example/README.md5". In step5, I tried to apply migrations but an exception occurred.
Here's an error message:
ImportError: cannot import name 'url' from 'django.conf.urls'
I tried Django Version 3.2.10, it went well. All worked.
What I Did
Applied migrations on Django 4.0 (Failed)
Applied migrations on Django 3.2.10 (Success)
I'm very new to Programming and OSS Dev so I don't know this will help or not but I just report this.
This is what I was looking for! You guys doing a great job. Big thanks from the far east.
The text was updated successfully, but these errors were encountered: