Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: Event loop is closed #6

Closed
mayi140611 opened this issue May 29, 2024 · 2 comments
Closed

RuntimeError: Event loop is closed #6

mayi140611 opened this issue May 29, 2024 · 2 comments

Comments

@mayi140611
Copy link

python app.py

[Please input the topic of your daily news collection]: Today's news about AI Models Appliaction
2024-05-29 03:40:35,761 [INFO] [Outline Generated] {'report_title': "Today's News about AI Models Application", 'column_list': [{'column_title': 'New Developments', 'column_requirement': 'Articles should focus on the latest advancements, breakthroughs, and innovations in AI model applications.', 'search_keywords': 'AI models application machine learning deep learning neural networks natural language processing computer vision'}, {'column_title': 'Industry Impact', 'column_requirement': 'Articles should explore how AI models are being used to transform industries such as healthcare, finance, and transportation.', 'search_keywords': 'AI in healthcare AI in finance AI in transportation industry 4.0 automation robotics'}, {'column_title': 'Ethics and Concerns', 'column_requirement': 'Articles should discuss the ethical implications, biases, and concerns surrounding the development and deployment of AI models.', 'search_keywords': 'AI ethics bias fairness transparency accountability explainability'}]}
2024-05-29 03:40:40,764 [INFO] [Start Generate Column] New Developments
2024-05-29 03:40:41,204 [INFO] [Search News Count] 4
Task exception was never retrieved
future: <Task finished name='Task-4' coro=<AsyncClient.aclose() done, defined at /opt/conda/lib/python3.10/site-packages/httpx/_client.py:2011> exception=RuntimeError('Event loop is closed')>
Traceback (most recent call last):
File "/opt/conda/lib/python3.10/site-packages/httpx/_client.py", line 2018, in aclose
await self._transport.aclose()
File "/opt/conda/lib/python3.10/site-packages/httpx/_transports/default.py", line 385, in aclose
await self._pool.aclose()
File "/opt/conda/lib/python3.10/site-packages/httpcore/_async/connection_pool.py", line 313, in aclose
await self._close_connections(closing_connections)
File "/opt/conda/lib/python3.10/site-packages/httpcore/_async/connection_pool.py", line 305, in _close_connections
await connection.aclose()
File "/opt/conda/lib/python3.10/site-packages/httpcore/_async/connection.py", line 171, in aclose
await self._connection.aclose()
File "/opt/conda/lib/python3.10/site-packages/httpcore/_async/http11.py", line 265, in aclose
await self._network_stream.aclose()
File "/opt/conda/lib/python3.10/site-packages/httpcore/_backends/anyio.py", line 55, in aclose
await self._stream.aclose()
File "/opt/conda/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 1191, in aclose
self._transport.close()
File "/opt/conda/lib/python3.10/asyncio/selector_events.py", line 706, in close
self._loop.call_soon(self._call_connection_lost, None)
File "/opt/conda/lib/python3.10/asyncio/base_events.py", line 753, in call_soon
self._check_closed()
File "/opt/conda/lib/python3.10/asyncio/base_events.py", line 515, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed

RuntimeError: Event loop is closed
2024-05-29 03:40:52,092 [INFO] [Picked News Count] 1
2024-05-29 03:40:52,092 [INFO] [Summarzing] An Alternative to Conventional Neural Networks Could Help Reveal What AI Is Doing behind the Scenes
2024-05-29 03:40:57,478 [INFO] [Summarzing] Failed
2024-05-29 03:41:02,480 [INFO] [Start Generate Column] Industry Impact
2024-05-29 03:41:02,887 [INFO] [Search News Count] 4
2024-05-29 03:41:24,160 - ERROR - Node Execution Exception: 'pick_news'(78852fae-05d0-4eb5-b860-867b759bf541) 'can_use'
2024-05-29 03:41:24,161 - ERROR - Node Execution Exception: 'generate_columns'(e12a26a2-52fe-4fea-90cf-d704d6e05fa4) 'can_use'
Traceback (most recent call last):
File "/opt/conda/lib/python3.10/site-packages/Agently/Workflow/MainExecutor.py", line 266, in _exec_chunk_with_dep_core
exec_res = chunk_executor(deps_dict, self.store)
File "/home/jupyter/ian/Agently-Daily-News-Collector/workflows/column_workflow.py", line 52, in pick_news_executor
if pick_result["can_use"]:
KeyError: 'can_use'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/conda/lib/python3.10/site-packages/Agently/Workflow/MainExecutor.py", line 266, in _exec_chunk_with_dep_core
exec_res = chunk_executor(deps_dict, self.store)
File "/home/jupyter/ian/Agently-Daily-News-Collector/workflows/main_workflow.py", line 58, in generate_columns_executor
column_data = start_column_workflow(
File "/home/jupyter/ian/Agently-Daily-News-Collector/workflows/column_workflow.py", line 151, in start
column_workflow.start()
File "/opt/conda/lib/python3.10/site-packages/Agently/Workflow/Workflow.py", line 66, in start
self.executor.start(runtime_data)
File "/opt/conda/lib/python3.10/site-packages/Agently/Workflow/MainExecutor.py", line 33, in start
self._execute_main(entries)
File "/opt/conda/lib/python3.10/site-packages/Agently/Workflow/MainExecutor.py", line 70, in _execute_main
self._execute_partial(
File "/opt/conda/lib/python3.10/site-packages/Agently/Workflow/MainExecutor.py", line 108, in _execute_partial
child_executed = self._execute_single_chunk(
File "/opt/conda/lib/python3.10/site-packages/Agently/Workflow/MainExecutor.py", line 165, in _execute_single_chunk
self._execute_single_chunk_core(
File "/opt/conda/lib/python3.10/site-packages/Agently/Workflow/MainExecutor.py", line 194, in _execute_single_chunk_core
exec_value = self._exec_chunk_with_dep_core(chunk, single_dep_map)
File "/opt/conda/lib/python3.10/site-packages/Agently/Workflow/MainExecutor.py", line 270, in _exec_chunk_with_dep_core
raise Exception(e)
Exception: 'can_use'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/jupyter/ian/Agently-Daily-News-Collector/app.py", line 21, in
main_workflow.start(
File "/home/jupyter/ian/Agently-Daily-News-Collector/workflows/main_workflow.py", line 109, in start
main_workflow.start()
File "/opt/conda/lib/python3.10/site-packages/Agently/Workflow/Workflow.py", line 66, in start
self.executor.start(runtime_data)
File "/opt/conda/lib/python3.10/site-packages/Agently/Workflow/MainExecutor.py", line 33, in start
self._execute_main(entries)
File "/opt/conda/lib/python3.10/site-packages/Agently/Workflow/MainExecutor.py", line 70, in _execute_main
self._execute_partial(
File "/opt/conda/lib/python3.10/site-packages/Agently/Workflow/MainExecutor.py", line 108, in _execute_partial
child_executed = self._execute_single_chunk(
File "/opt/conda/lib/python3.10/site-packages/Agently/Workflow/MainExecutor.py", line 165, in _execute_single_chunk
self._execute_single_chunk_core(
File "/opt/conda/lib/python3.10/site-packages/Agently/Workflow/MainExecutor.py", line 194, in _execute_single_chunk_core
exec_value = self._exec_chunk_with_dep_core(chunk, single_dep_map)
File "/opt/conda/lib/python3.10/site-packages/Agently/Workflow/MainExecutor.py", line 270, in _exec_chunk_with_dep_core
raise Exception(e)
Exception: 'can_use'

@Maplemx
Copy link
Contributor

Maplemx commented May 30, 2024

"Event loop is closed" is a tricky issue we're still looking into it in main development framework.

Most of time, this error report is just annoying but will not affect the final output.

To follow up this bug fix, check this issue: Maplemx/Agently#65

@Maplemx
Copy link
Contributor

Maplemx commented May 30, 2024

We seems like having fixed this issue in Agently v3.2.2.10

Please update Agently by using pip install Agently>=3.2.2.10 to solve this problem

@Maplemx Maplemx closed this as completed Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants