Прохожу учебник по channels, ссылка - https://django.fun/docs/channels/ru/3/tutorial/part_2/
На учебник, часть 2, после того как провел миграции что потребитель для пути /ws/chat/ROOM_NAME/ работает.
и запустил runserver вылетают ошибки:
File "C:\Users\Vitaliy\PycharmProjects\Funpay\venv\lib\site-packages\channels\routing.py", line 28, in get_default_application
module = importlib.import_module(path)
File "C:\Users\Vitaliy\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 790, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "C:\Users\Vitaliy\PycharmProjects\Funpay\funpay\Funpay\asgi.py", line 14, in <module>
from .. Pay import routing
ImportError: attempted relative import beyond top-level package
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Vitaliy\AppData\Local\Programs\Python\Python39\lib\threading.py", line 950, in _bootstrap_inner
self.run()
File "C:\Users\Vitaliy\AppData\Local\Programs\Python\Python39\lib\threading.py", line 888, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\Vitaliy\PycharmProjects\Funpay\venv\lib\site-packages\django\utils\autoreload.py", line 64, in wrapper
fn(*args, **kwargs)
File "C:\Users\Vitaliy\PycharmProjects\Funpay\venv\lib\site-packages\channels\management\commands\runserver.py", line 107, in inner_run
application=self.get_application(options),
File "C:\Users\Vitaliy\PycharmProjects\Funpay\venv\lib\site-packages\channels\management\commands\runserver.py", line 132, in get_application
return StaticFilesWrapper(get_default_application())
File "C:\Users\Vitaliy\PycharmProjects\Funpay\venv\lib\site-packages\channels\routing.py", line 30, in get_default_application
raise ImproperlyConfigured("Cannot import ASGI_APPLICATION module %r" % path)
django.core.exceptions.ImproperlyConfigured: Cannot import ASGI_APPLICATION module 'Funpay.asgi'