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

Several Error Messages #391

Closed
lisahlstn opened this issue May 27, 2021 · 5 comments
Closed

Several Error Messages #391

lisahlstn opened this issue May 27, 2021 · 5 comments

Comments

@lisahlstn
Copy link

Hi all,

Thank you a lot for the great package.

I'm using the package (latest version 1.4.8) for a scheduled extraction of google trends data and I'm struggling with some errors. The errors don't come up all the time but only every once in a while and I can't seem to find a pattern in their occurence.

The query I'm using simply loops over about 10 keywords:
gtrends(keywords[i], time = "now 4-H", geo = c("DE"), category = categories[i], hl = "en-US")

Could someone please elaborate if the errors simply occur due to usage limits of the API or if there are other reasons for each error? Any help on why the errors occur and how to solve them would be highly appreciated.

Thanks in advance!

@PMassicotte
Copy link
Owner

You have to provide a reproducible example in order for us to understand the problem.

@JWEDSONF
Copy link

I've been having the same problem for a while.

Sometimes the code runs normally.

From what I observed, it depends on the period in the "TIME =" parameter

siderurgica_all = gtrends(c("Arcelormittal","Usiminas","Companhia Siderúrgica do Pecém","Companhia Siderúrgica Nacional"), time = "all", geo = c("BR"), hl = "pt-BR")

runtime error
Error in FUN(X[[i]], ...) : Status code was not 200. Returned status code:429

I've tried on different networks and even on computers with different windows versions. But the error persists

thanks for the support

@PMassicotte
Copy link
Owner

It works fine on my side:

r$> head(gtrends(c("Arcelormittal","Usiminas","Companhia Siderúrgica do Pecém","Companhia Siderúrgica Nacional"), time = "all",  geo = c("BR"), hl = "pt-BR")$interest_over_time)
        date hits       keyword geo time gprop category
1 2004-01-01    0 Arcelormittal  BR  all   web        0
2 2004-02-01    0 Arcelormittal  BR  all   web        0
3 2004-03-01    0 Arcelormittal  BR  all   web        0
4 2004-04-01    0 Arcelormittal  BR  all   web        0
5 2004-05-01    0 Arcelormittal  BR  all   web        0
6 2004-06-01    0 Arcelormittal  BR  all   web        0

@JWEDSONF
Copy link

Yes, at times the data is imported and at other times it is not.

I've already broken my head and I can't solve it

@ilolic
Copy link

ilolic commented Jan 12, 2023

I have the same problem. Tried running the first example for gtrends function and still got the same error (tried installing new versions)
gtrends("NHL")

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