I followed the tutorial on django channel site which has link: https://channels.readthedocs.io/en/latest/tutorial/part_2.html
import channels.layers from asgiref.sync import async_to_sync print("running") channel_layer = channels.layers.get_channel_layer() async_to_sync(channel_layer.send)('test_channel', {'type': 'hello'}) <------ this is the cause of error but why i am not able to figure it out Then i got Segmented fault error, So the stack trace for the error was : Fatal Python error: Segmentation fault Current thread 0x00007f9657fff700 (most recent call first): File "/home/abohra/Documents/Dev/ex/env/lib/python3.7/weakref.py", line 364 in remove Thread 0x00007f965c99f700 (most recent call first): File "/usr/lib/python3.7/selectors.py", line 484 in close File "/usr/lib/python3.7/asyncio/selector_events.py", line 89 in close File "/usr/lib/python3.7/asyncio/unix_events.py", line 55 in close File "/home/abohra/Documents/Dev/ex/env/lib/python3.7/site-packages/channels_redis/core.py", line 34 in _wrapper File "/home/abohra/Documents/Dev/ex/env/lib/python3.7/site-packages/asgiref/sync.py", line 124 in _run_event_loop File "/usr/lib/python3.7/concurrent/futures/thread.py", line 57 in run File "/usr/lib/python3.7/concurrent/futures/thread.py", line 80 in _worker File "/usr/lib/python3.7/threading.py", line 870 in run File "/usr/lib/python3.7/threading.py", line 926 in _bootstrap_inner File "/usr/lib/python3.7/threading.py", line 890 in _bootstrap Thread 0x00007f96605b6740 (most recent call first): File "/home/abohra/Documents/Dev/ex/env/lib/python3.7/site-packages/asgiref/current_thread_executor.py", line 65 in run_until_future File "/home/abohra/Documents/Dev/ex/env/lib/python3.7/site-packages/asgiref/sync.py", line 91 in __call__ File "/home/abohra/Documents/Dev/ex/experimenting/tester.py", line 7 in <module> File "<frozen importlib._bootstrap>", line 219 in _call_with_frames_removed File "<frozen importlib._bootstrap_external>", line 728 in exec_module File "<frozen importlib._bootstrap>", line 677 in _load_unlocked File "<frozen importlib._bootstrap>", line 967 in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 983 in _find_and_load File "<console>", line 1 in <module> File "/usr/lib/python3.7/code.py", line 90 in runcode File "/usr/lib/python3.7/code.py", line 74 in runsource File "/usr/lib/python3.7/code.py", line 258 in push File "/usr/lib/python3.7/code.py", line 232 in interact File "/usr/lib/python3.7/code.py", line 301 in interact File "/home/abohra/Documents/Dev/ex/env/lib/python3.7/site-packages/django/core/management/commands/shell.py", line 81 in python File "/home/abohra/Documents/Dev/ex/env/lib/python3.7/site-packages/django/core/management/commands/shell.py", line 99 in handle File "/home/abohra/Documents/Dev/ex/env/lib/python3.7/site-packages/django/core/management/base.py", line 364 in execute File "/home/abohra/Documents/Dev/ex/env/lib/python3.7/site-packages/django/core/management/base.py", line 323 in run_from_argv File "/home/abohra/Documents/Dev/ex/env/lib/python3.7/site-packages/django/core/management/__init__.py", line 375 in execute File "/home/abohra/Documents/Dev/ex/env/lib/python3.7/site-packages/django/core/management/__init__.py", line 381 in execute_from_command_line File "./manage.py", line 17 in main File "./manage.py", line 21 in <module> Any Help is Appreciated. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/df2c3055-79c2-4f99-8192-6608060ff346%40googlegroups.com.