I am going through the tutorial and I came across the following error when trying to run the Intertask Communication example. Thought to let you know.
(venv) ~/delete: python curio_tutorial.py
Task Crash: Task(id=3, name='dispatcher', state='TERMINATED')
Traceback (most recent call last):
File "/home/diogo/delete/venv/lib/python3.8/site-packages/curio/kernel.py", line 731, in kernel_run
trap = current.send(current._trap_result)
File "/home/diogo/delete/venv/lib/python3.8/site-packages/curio/task.py", line 171, in send
return self._send(value)
File "/home/diogo/delete/venv/lib/python3.8/site-packages/curio/task.py", line 175, in _task_runner
return await coro
File "curio_tutorial.py", line 8, in dispatcher
async for msg in messages:
TypeError: 'async for' requires an object with __aiter__ method, got Queue
Task Crash: Task(id=4, name='subscriber', state='TERMINATED')
Traceback (most recent call last):
File "/home/diogo/delete/venv/lib/python3.8/site-packages/curio/kernel.py", line 731, in kernel_run
trap = current.send(current._trap_result)
File "/home/diogo/delete/venv/lib/python3.8/site-packages/curio/task.py", line 171, in send
return self._send(value)
File "/home/diogo/delete/venv/lib/python3.8/site-packages/curio/task.py", line 175, in _task_runner
return await coro
File "curio_tutorial.py", line 21, in subscriber
async for msg in queue:
TypeError: 'async for' requires an object with __aiter__ method, got Queue
Task Crash: Task(id=5, name='subscriber', state='TERMINATED')
Traceback (most recent call last):
File "/home/diogo/delete/venv/lib/python3.8/site-packages/curio/kernel.py", line 731, in kernel_run
trap = current.send(current._trap_result)
File "/home/diogo/delete/venv/lib/python3.8/site-packages/curio/task.py", line 171, in send
return self._send(value)
File "/home/diogo/delete/venv/lib/python3.8/site-packages/curio/task.py", line 175, in _task_runner
return await coro
File "curio_tutorial.py", line 21, in subscriber
async for msg in queue:
TypeError: 'async for' requires an object with __aiter__ method, got Queue
Task Crash: Task(id=6, name='subscriber', state='TERMINATED')
Traceback (most recent call last):
File "/home/diogo/delete/venv/lib/python3.8/site-packages/curio/kernel.py", line 731, in kernel_run
trap = current.send(current._trap_result)
File "/home/diogo/delete/venv/lib/python3.8/site-packages/curio/task.py", line 171, in send
return self._send(value)
File "/home/diogo/delete/venv/lib/python3.8/site-packages/curio/task.py", line 175, in _task_runner
return await coro
File "curio_tutorial.py", line 21, in subscriber
async for msg in queue:
TypeError: 'async for' requires an object with __aiter__ method, got Queue
Hi David,
I am going through the tutorial and I came across the following error when trying to run the
Intertask Communication
example. Thought to let you know.ps: All the remaining examples run as expected.