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

Fix uncaught exception in Google retrieval #1018

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

winsonluk
Copy link
Contributor

File "/home/winston/.local/lib/python3.10/site-packages/gp _researcher/retrievers/google/google.py", line 83, in searc
h
"body": result["snippet"],
KeyError: 'snippet'
Error! : HTTPSConnectionPool(host='zyk.bjhd.gov.cn', port=44
3): Read timed out. (read timeout=4)

gpt-researcher crashes if a Google search result doesn't contain a snippet (which happens on errors such as read timeout)

@winsonluk
Copy link
Contributor Author

@assafelovic sorry for all the PRs, just another bug fix. gpt-r completely crashes when scraping certain websites with Google.

@assafelovic
Copy link
Owner

@winsonluk the opposite! Please create as many PRs as you think are necessary, love your work! Thanks

@assafelovic assafelovic merged commit eef63fe into assafelovic:master Dec 11, 2024
@winsonluk
Copy link
Contributor Author

@assafelovic thank you! just curious, do you know when the next package release to pip will be?

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

Successfully merging this pull request may close these issues.

2 participants