Is anyone getting this error? TypeError: 'async for' requires an object with __aiter__ method, got generator #189
Closed
samuelcartaxo
started this conversation in
General
Replies: 1 comment
-
I fixed the problem with this patch |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
(chatgpt) C:\Users\Samuel\Documents\OneDrive\Projetos\Exp\PythonGPT3Tutorial-main> c: && cd c:\Users\Samuel\Documents\OneDrive\Projetos\Exp\PythonGPT3Tutorial-main && cmd /C "C:\Users\Samuel\anaconda3\envs\chatgpt\python.exe c:\Users\Samuel.vscode\extensions\ms-python.python-2023.2.0\pythonFiles\lib\python\debugpy\adapter/../..\debugpy\launcher 53511 -- c:\Users\Samuel\Documents\OneDrive\Projetos\Exp\PythonGPT3Tutorial-main\chatgpt_api.py "
Traceback (most recent call last):
File "c:\Users\Samuel\Documents\OneDrive\Projetos\Exp\PythonGPT3Tutorial-main\chatgpt_api.py", line 77, in
response = bot.ask("Hello, world!")
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Samuel\anaconda3\envs\chatgpt\Lib\site-packages\chatgpt_wrapper\chatgpt.py", line 503, in ask
return asyncio.run(super().ask(message))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Samuel\anaconda3\envs\chatgpt\Lib\site-packages\nest_asyncio.py", line 35, in run
return loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Samuel\anaconda3\envs\chatgpt\Lib\site-packages\nest_asyncio.py", line 90, in run_until_complete
return f.result()
^^^^^^^^^^
File "C:\Users\Samuel\anaconda3\envs\chatgpt\Lib\asyncio\futures.py", line 203, in result
raise self._exception.with_traceback(self._exception_tb)
File "C:\Users\Samuel\anaconda3\envs\chatgpt\Lib\asyncio\tasks.py", line 267, in __step
result = coro.send(None)
^^^^^^^^^^^^^^^
File "C:\Users\Samuel\anaconda3\envs\chatgpt\Lib\site-packages\chatgpt_wrapper\chatgpt.py", line 463, in ask
response = list([i async for i in self.ask_stream(message)])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'async for' requires an object with aiter method, got generator
Beta Was this translation helpful? Give feedback.
All reactions