gpt_academic icon indicating copy to clipboard operation
gpt_academic copied to clipboard

调用谷歌学术小助手时出错

Open wlp233 opened this issue 2 years ago • 1 comments

调用谷歌学术小助手时出错

`Traceback (most recent call last): File "C:\Users\Administrator\Desktop\chatgpt_academic-master -lab3.0\chatgpt_academic-master\crazy_functions\谷歌检索小助手.py", line 38, in get_meta_information paper = next(search.results()) ^^^^^^^^^^^^^^^^^^^^^^ StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "C:\Users\Administrator\Desktop\chatgpt_academic-master -lab3.0\chatgpt_academic-master\toolbox.py", line 148, in decorated yield from f(txt, top_p, temperature, chatbot, history, systemPromptTxt, WEB_PORT) File "C:\Users\Administrator\Desktop\chatgpt_academic-master -lab3.0\chatgpt_academic-master\crazy_functions\谷歌检索小助手.py", line 84, in 谷歌检索小助手 meta_paper_info_list = yield from get_meta_information(txt, chatbot, history) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RuntimeError: generator raised StopIteration`

wlp233 avatar Apr 12 '23 01:04 wlp233

url提供一下?

binary-husky avatar Apr 12 '23 03:04 binary-husky

https://scholar.google.com/scholar?as_ylo=2019&q=%E6%97%A0%E4%BA%BA%E9%A9%BE%E9%A9%B6%E6%8A%80%E6%9C%AF&hl=zh-CN&as_sdt=0,5

achanxz avatar May 15 '23 03:05 achanxz

url提供一下?

https://scholar.google.com/scholar?as_ylo=2019&q=%E6%97%A0%E4%BA%BA%E9%A9%BE%E9%A9%B6%E6%8A%80%E6%9C%AF&hl=zh-CN&as_sdt=0,5

achanxz avatar May 15 '23 03:05 achanxz

有些比较上古的文献好像 arxiv 模块会找不到结果,search.results() 的返回值是一个空的生成器 报错的代码:

paper = next(search.result())

之前应该加一个对search.results()是否为空的判断,或者用 try-catch 包装一下

duhaode520 avatar May 15 '23 07:05 duhaode520