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

Search TypeError: argument 'params': 'list' object cannot be converted to 'PyString' #11

Open
Neasontlj opened this issue Jun 11, 2024 · 4 comments

Comments

@Neasontlj
Copy link

2024-06-11 10:29:37,169 [INFO] [Start Generate Column] 武汉历史沿革
2024-06-11 10:29:37,983 [ERROR] [Search]: Can not search '['武汉', '历史', '演变', '楚河汉街', '黄鹤楼', '辛亥革命']'. Error: https://duckduckgo.com/news.js TypeError: argument 'params': 'list' object cannot be converted to 'PyString'
2024-06-11 10:29:37,983 [INFO] [Search News Count] 0
2024-06-11 10:29:37,984 [INFO] [Picked News Count] 0
2024-06-11 10:29:37,984 [INFO] [Start Generate Column] 名人与武汉
2024-06-11 10:29:40,420 [ERROR] [Search]: Can not search '['武汉名人', '文化名人', '历史人物', '屈原', '李白', '张之洞']'. Error: https://duckduckgo.com/news.js TypeError: argument 'params': 'list' object cannot be converted to 'PyString'
2024-06-11 10:29:40,420 [INFO] [Search News Count] 0
2024-06-11 10:29:40,420 [INFO] [Picked News Count] 0
2024-06-11 10:29:40,421 [INFO] [Start Generate Column] 武汉地方文化
2024-06-11 10:29:41,159 [ERROR] [Search]: Can not search '['武汉文化', '民俗', '戏曲', '热干面', '豆皮', '楚剧']'. Error: https://duckduckgo.com/news.js TypeError: argument 'params': 'list' object cannot be converted to 'PyString'
2024-06-11 10:29:41,161 [INFO] [Search News Count] 0
2024-06-11 10:29:41,161 [INFO] [Picked News Count] 0
2024-06-11 10:29:41,161 [INFO] [Markdown Generation Failed] Due to have not any column data.
报错信息 以上

@Neasontlj
Copy link
Author

2024-06-11 10:29:32,167 [INFO] [Outline Generated] {'report_title': '武汉历史文化特辑', 'column_list': [{'column_title': '武汉历史沿革', 'column_requirement': '内容需涵盖武汉的历史变迁、重要历史事件和文化遗迹', 'search_keyw', '辛亥革命']}, {'column_title': '名人与武汉', 'column_requirement': '聚焦对武汉有重大影响的历史人物,如屈原、李白、张之洞等', 'search_keywords': ['武汉名人', '文化名人', '历史人物', '屈原', '李白', '张之洞']}, {'column_title':容', 'search_keywords': ['武汉文化', '民俗', '戏曲', '热干面', '豆皮', '楚剧']}]}
2024-06-11 10:29:37,169 [INFO] [Start Generate Column] 武汉历史沿革
2024-06-11 10:29:37,983 [ERROR] [Search]: Can not search '['武汉', '历史', '演变', '楚河汉街', '黄鹤楼', '辛亥革命']'. Error: https://duckduckgo.com/news.js TypeError: argument 'params': 'list' object cannot be converted to 'PyString'
2024-06-11 10:29:37,983 [INFO] [Search News Count] 0
2024-06-11 10:29:37,984 [INFO] [Picked News Count] 0
2024-06-11 10:29:37,984 [INFO] [Start Generate Column] 名人与武汉
2024-06-11 10:29:40,420 [ERROR] [Search]: Can not search '['武汉名人', '文化名人', '历史人物', '屈原', '李白', '张之洞']'. Error: https://duckduckgo.com/news.js TypeError: argument 'params': 'list' object cannot be converted to 'PyString'
2024-06-11 10:29:40,420 [INFO] [Search News Count] 0
2024-06-11 10:29:40,420 [INFO] [Picked News Count] 0
2024-06-11 10:29:40,421 [INFO] [Start Generate Column] 武汉地方文化
2024-06-11 10:29:41,159 [ERROR] [Search]: Can not search '['武汉文化', '民俗', '戏曲', '热干面', '豆皮', '楚剧']'. Error: https://duckduckgo.com/news.js TypeError: argument 'params': 'list' object cannot be converted to 'PyString'
2024-06-11 10:29:41,161 [INFO] [Search News Count] 0
2024-06-11 10:29:41,161 [INFO] [Picked News Count] 0
2024-06-11 10:29:41,161 [INFO] [Markdown Generation Failed] Due to have not any column data.

@Maplemx
Copy link
Contributor

Maplemx commented Jun 14, 2024

this issue is caused by model output in wrong format.

we expect search_keywords output a string contains all keywords and use space to split

but the search_keywords output in your log is a list, that cause the error

but this is a understandable and usual model output mistake, we can try to handle it by check the output data type like:

if isinstance(column_info["search_keywords"], list):
    column_info["search_keywords"] = " ".combine(column_info["search_keywords"]

I will update code to add some compatible logic

@YueYongDev
Copy link

i also get this error, is there any update about this issue?

@FuzzyCatZ
Copy link

your [Search News Count] is 0. This might because the NEWS_TIME_LIMIT setting is too short to return any results. I suggest changing it from 'd' to 'w'."

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

4 participants