AgentEra / Agently-Daily-News-Collector

An open-source LLM based automatically daily news collecting workflow showcase powered by Agently AI application development framework.
http://agently.tech
Apache License 2.0
443 stars 74 forks source link

Exception: 'NoneType' object is not iterable #16

Closed zxwmol closed 4 months ago

zxwmol commented 5 months ago
[Use Customize Outline] {'report_title': 'AIGC行业动态', 'column_list': [{'column_title': 'AIGC', 'column_requirement': '最近发布的AIGC信息', 'search_keywords': 'AIGC 新技术 发布'}, {'column_title': '大模型技术', 'column_requirement': '最近宣布的大模型技术突破', 'search_keywords': '大模型 技术 突破 发布'}, {'column_title': '图像处理', 'column_requirement': '最近发布的图像处理技术突破', 'search_keywords': '图像处理 技术 突破 发布'}, {'column_title': '视频创作', 'column_requirement': '最近发布的视频创作技术突破', 'search_keywords': '视频创作 技术 突破 发布'}, {'column_title': '音频创作', 'column_requirement': '最近发布的音频创作技术突破', 'search_keywords': '音频创作 技术 突破 发布'}]}

2024-06-19 02:14:48,798 [INFO] [Start Generate Column] AIGC 2024-06-19 02:14:49,210 [INFO] [Search News Count] 0 2024-06-19 02:14:49,211 [INFO] [Picked News Count] 0 2024-06-19 02:14:49,212 [INFO] [Start Generate Column] 大模型技术 2024-06-19 02:14:49,695 [INFO] [Search News Count] 8 [Request Data] { "messages": [ { "role": "user", "content": "# [INPUT]:\n[{'id': 0, 'title': '中国气象局发布三个AI气象大模型系统:命名风清、风雷、风顺', 'brief': '\"风清\"\"风雷\"\"风顺\"三个大模型已完成了基于国产全球大气再分析资料CRA-40、雷达观测资料、风云卫星遥感资料的训练和检验评估,有效降低了目前主流气象预报大模型对国际再分析资料的依赖度。', 'url': 'https://finance.sina.com.cn/tech/discovery/2024-06-19/doc-inazfpym7681468.shtml', 'source': '新浪网', 'date': '2024-06-19T00:09:00+00:00'}, {'id': 1, 'title': '中国气象局发布三个人工智能气象大模型系统', 'brief': '6月18日,中国气象局发布人工智能全球中短期预报系统\"风清\"、人工智能临近预报系统\"风雷\"和人工智能全球次季节—季节预测系统\"风顺\"。综合国内气象大模型发展并对标国际前沿进展,中国气象局联合清华大学组建攻关团队,在大模型预报核心技术、预报精准程度上寻求突破,构建了\"风清\"大模型。该模型具有大气强物理融入...,系统,人工智能,智能,智能,人工智能', 'url': 'http://www.ca800.com/news/d_1o5n9ifp67bl1.html', 'source': '中国自动化网', 'date': '2024-06-18T21:56:00+00:00'}, {'id': 2, 'title': '收盘前20cm跳水跌停,又一家公司退市!华为官宣,倒计时3天,盘古大模型5.0将发布', 'brief': '近日,湖南钢铁集团旗下湘钢与华为、湖南移动联合打造的钢铁行业盘古大模型应用,在瑞士日内瓦召开的2024年\"人工智能向善全球峰会\"上,从全球38个国家的数百个案例中脱颖而出,成功斩获国际电信联盟全球人工智能优秀创新案例奖。另外,盘古大模型还在气象、汽车、金融等领域发挥作用,提升生产效率,降低研发成本。', 'url': 'https://stock.stockstar.com/SS2024061900014262.shtml', 'source': '证券之星', 'date': '2024-06-19T00:50:00+00:00'}, {'id': 3, 'title': '收盘前20cm跳水跌停,尾盘近160万资金\"博傻\",又一家公司退市!华为官宣,倒计时3天,盘古大模型5.0将发布', 'brief': '盘古大模型5.0计划在6月21日发布。ST巴安尾盘跌停锁定退市结局此前连续19个交易日收盘股价低于1元的ST巴安迎来保壳\"生死战\"。盘古大模型5.0即将发布据华为开发者大会官网,华为开发者大会将于6月21日~23日在东莞松山湖举行,届时华为将分享HarmonyOS、盘古大模型、昇腾AI云服务、GaussDB数据库等最新创新成果', 'url': 'http://stock.hexun.com/2024-06-19/213228006.html', 'source': '和讯网', 'date': '2024-06-18T22:57:00+00:00'}, {'id': 4, 'title': '又一家公司退市!华为官宣 倒计时3天 盘古大模型5.0将发布', 'brief': '近日,湖南钢铁集团旗下湘钢与华为、湖南移动联合打造的 钢铁行业 盘古大模型应用,在瑞士日内瓦召开的2024年\" 人工智能 向善全球峰会\"上,从全球38个国家的数百个案例中脱颖而出,成功斩获国际电信联盟全球 人工智能 优秀创新案例奖。另外,盘古大模型还在气象、汽车、金融等领域发挥作用,提升生产效率,降低研发成本。 (原标题:收盘前20cm跳水跌停,尾盘近160万资金\"博傻\",又一家公司退市!华为官宣,倒计时3天,盘古大模型5.0将发布)', 'url': 'https://fund.eastmoney.com/a/202406183106848654.html', 'source': '东方财富网', 'date': '2024-06-18T10:56:00+00:00'}, {'id': 5, 'title': '\"数灵童\"震撼登场!信安数据发布国内首个数据治理\"数字人\"', 'brief': '信安\"数灵童\"产品的发布在行业发展方面也具有极大的价值和意义。首先,将行业大模型从知识问答级升级到事务级,不仅仅可以组织文字进行对话,还可以承担数据治理日常执行事务,这是\"驱动内核\"质的变化;其次,彻底改变了传统数据治理工作方式,不再需要在系统平台上复杂配置,仅需要简单的对话和选择就可以完成一项复杂的数据治理工作,极大降低了技术门槛;再次,创新的平台技术架构带来全新的\"建运一体\"建设模式,随着\"数灵童\"基础后台能力的建设完成,上层专项应用场景可以快速拓展,并随着使用的过程不断对大模型、智能体进行优化和调校,不断提升专项应用场景的工作成效;最后,\"数灵童\"的发布开启了数据治理领域大模型逐步代替人力的新时代,成本投入持续降低,工作效能不断提升,数据治理工作对于企业来说将不再是难题和负担。', 'url': 'https://finance.sina.com.cn/tech/roll/2024-06-19/doc-inazfpyq3110961.shtml', 'source': '新浪网', 'date': '2024-06-19T01:35:00+00:00'}, {'id': 6, 'title': '又一家公司退市!华为官宣 盘古大模型5.0将发布', 'brief': '盘古大模型5.0计划在6月21日发布。 ST巴安尾盘跌停 锁定退市结局 此前连续19个交易日收盘股价低于1 盘古大模型5.0计划在6月21日发布。 ST巴安尾盘跌停 此前连续19个交易日收盘股价低于1元的ST巴安迎来保壳\"生死战\"。 今日早盘,ST巴安开盘拉升,盘中持续震荡,在多空的持续博弈下,未能突破1元\"生死线\",盘中最高报价0.99元/股。 午后临近收盘前半小时,*ST巴安仍未能成功', 'url': 'http://www.dyhjw.com/gold/20240619-96598.html', 'source': '第一黄金网', 'date': '2024-06-18T17:00:00+00:00'}, {'id': 7, 'title': 'Meta发布多款模型:多模态模型Chameleon、文本生成音乐模型JASCO、音频水印技术AudioSeal等', 'brief': '虽然大多数当前的后期融合模型使用基于扩散的学习 ... 以改进对文本转图像模型的自动和人工评估。 这些项目的发布为 AI 领域带来了新的技术突破和应用前景,对于推动 AI 技术的发展和 ...', 'url': 'https://www.chinaz.com/ainews/9653.shtml', 'source': '站长之家', 'date': '2024-06-19T01:20:00+00:00'}]\n\n# [INSTRUCTION]:\nnews select rules:\n- 最近宣布的大模型技术突破\n- if several news are similar, just retain the one with most famous source and output\n {can_use} as false for others\n\n\n# [OUTPUT REQUIREMENT]:\n## TYPE:\nJSON can be parsed in Python\n## FORMAT:\n[\n\t\n\t{\n\t\t\"id\": ,//value from {input.[].id}\n\t\t\"can_use\": ,//judge if {input.brief} can be used according {instruct}\n\t\t\"recommend_comment\": ,//provide your recommend comment if {can_use} == true, or just output null\n\t\t},,\n\t\\...\n]\n\n\n[OUTPUT]:\n" } ], "model": "gpt-3.5-turbo", "temperature": 0.8, "stream": true } [Realtime Response]

Exception in thread Thread-1 (start_in_theard): Traceback (most recent call last): File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/local/lib/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/usr/local/lib/python3.10/site-packages/Agently/Agent/Agent.py", line 236, in start_in_theard reply = loop.run_until_complete(self.start_async(request_type)) File "/usr/local/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete return future.result() File "/usr/local/lib/python3.10/site-packages/Agently/Agent/Agent.py", line 227, in start_async raise(e) File "/usr/local/lib/python3.10/site-packages/Agently/Agent/Agent.py", line 202, in start_async async for response in event_generator: File "/usr/local/lib/python3.10/site-packages/Agently/plugins/request/OAIClient.py", line 217, in broadcast_response delta = dict(part.choices[0].delta) IndexError: list index out of range 2024-06-19 02:14:58,570 - ERROR - Node Execution Exception: 'pick_news'(5556e40c-b0c5-4a50-b857-5ee39dbc9c57) 'NoneType' object is not iterable 2024-06-19 02:14:58,571 - ERROR - Node Execution Exception: 'generate_columns'(e8d11a2d-1ade-4084-953e-73c1bf53416b) 'NoneType' object is not iterable Traceback (most recent call last): File "/usr/local/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 "/app/workflows/column_workflow.py", line 52, in pick_news_executor for pick_result in pick_results: TypeError: 'NoneType' object is not iterable

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/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 "/app/workflows/main_workflow.py", line 58, in generate_columns_executor column_data = start_column_workflow( File "/app/workflows/column_workflow.py", line 152, in start column_workflow.start() File "/usr/local/lib/python3.10/site-packages/Agently/Workflow/Workflow.py", line 67, in start self.executor.start(runtime_data) File "/usr/local/lib/python3.10/site-packages/Agently/Workflow/MainExecutor.py", line 33, in start self._execute_main(entries) File "/usr/local/lib/python3.10/site-packages/Agently/Workflow/MainExecutor.py", line 70, in _execute_main self._execute_partial( File "/usr/local/lib/python3.10/site-packages/Agently/Workflow/MainExecutor.py", line 108, in _execute_partial child_executed = self._execute_single_chunk( File "/usr/local/lib/python3.10/site-packages/Agently/Workflow/MainExecutor.py", line 165, in _execute_single_chunk self._execute_single_chunk_core( File "/usr/local/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 "/usr/local/lib/python3.10/site-packages/Agently/Workflow/MainExecutor.py", line 270, in _exec_chunk_with_dep_core raise Exception(e) Exception: 'NoneType' object is not iterable

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/app.py", line 21, in main_workflow.start( File "/app/workflows/main_workflow.py", line 109, in start main_workflow.start() File "/usr/local/lib/python3.10/site-packages/Agently/Workflow/Workflow.py", line 67, in start self.executor.start(runtime_data) File "/usr/local/lib/python3.10/site-packages/Agently/Workflow/MainExecutor.py", line 33, in start self._execute_main(entries) File "/usr/local/lib/python3.10/site-packages/Agently/Workflow/MainExecutor.py", line 70, in _execute_main self._execute_partial( File "/usr/local/lib/python3.10/site-packages/Agently/Workflow/MainExecutor.py", line 108, in _execute_partial child_executed = self._execute_single_chunk( File "/usr/local/lib/python3.10/site-packages/Agently/Workflow/MainExecutor.py", line 165, in _execute_single_chunk self._execute_single_chunk_core( File "/usr/local/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 "/usr/local/lib/python3.10/site-packages/Agently/Workflow/MainExecutor.py", line 270, in _exec_chunk_with_dep_core raise Exception(e) Exception: 'NoneType' object is not iterable Task was destroyed but it is pending! task: <Task pending name='Task-3' coro=<()>>

参考https://github.com/AgentEra/Agently-Daily-News-Collector/issues/7 切换gpt4报同样的错误。

Maplemx commented 5 months ago

根据输出日志来看,应该是在模型输出的时候遇到了问题,和引用的issue不是同一个问题,引用的issue是模型能够正常输出,但是输出内容本身没有JSON格式的信息。

所以还是需要检查一下为什么模型没有办法进行输出,现在的输出日志我没有发现相关的信息。

zxwmol commented 4 months ago

很奇怪,我没做任何改变,上周失败,今天重新测试验证一切正常。。 ![Uploading image.png…]()

Maplemx commented 4 months ago

有可能是模型单次输出的时候的不稳定,在当前阶段,这是一个不太能够避免的问题