res$status_code == 200 is not TRUE
Closed this issue ยท 24 comments
I have error message "res$status_code == 200 is not TRUE" since yesterday ... 2 days ago everything was OK... I've changed network and IP address (to reset potential quota problems) - no effect.
Fragment of my code:
install.packages("devtools")
devtools::install_github("PMassicotte/gtrendsR")
install.packages("httr")
install.packages("lubridate")
library("httr")
library("gtrendsR")
seriale_weekly_combo = gtrends(c("TVN"), geo = "PL", time = "2016-01-01 2017-12-31")$interest_over_time
Please see other issue before posting. #252
Problem is back
Unfortunately, I confirm the same error has started to appear in the last 24 hours. I tried myself and several colleagues in Europe and in Russia, with different platforms, but the error is the same:
Error in FUN(X[[i]], ...) :
Status code was not 200. Returned status code:401
For example, this is my session info,
sessionInfo()
R version 4.0.0 (2020-04-24)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 16299)
Matrix products: default
locale:
[1] LC_COLLATE=Russian_Russia.1251 LC_CTYPE=Russian_Russia.1251 LC_MONETARY=Russian_Russia.1251 LC_NUMERIC=C
[5] LC_TIME=Russian_Russia.1251
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] rio_0.5.16 gtrendsR_1.4.4.9000 lubridate_1.7.8 forcats_0.5.0 stringr_1.4.0 dplyr_0.8.5 purrr_0.3.4
[8] readr_1.3.1 tidyr_1.0.2 tibble_3.0.1 ggplot2_3.3.0 tidyverse_1.3.0
loaded via a namespace (and not attached):
[1] Rcpp_1.0.4.6 lattice_0.20-41 zoo_1.8-7 prettyunits_1.1.1 ps_1.3.2 assertthat_0.2.1 rprojroot_1.3-2
[8] digest_0.6.25 R6_2.4.1 cellranger_1.1.0 backports_1.1.6 reprex_0.3.0 httr_1.4.1 pillar_1.4.4
[15] rlang_0.4.5 curl_4.3 readxl_1.3.1 data.table_1.12.8 rstudioapi_0.11 callr_3.4.3 desc_1.2.0
[22] devtools_2.3.0 foreign_0.8-78 munsell_0.5.0 broom_0.5.6 compiler_4.0.0 modelr_0.1.7 pkgconfig_2.0.3
[29] pkgbuild_1.0.7 tidyselect_1.0.0 fansi_0.4.1 crayon_1.3.4 dbplyr_1.4.3 withr_2.2.0 grid_4.0.0
[36] nlme_3.1-147 jsonlite_1.6.1 gtable_0.3.0 lifecycle_0.2.0 DBI_1.1.0 magrittr_1.5 scales_1.1.0
[43] zip_2.0.4 cli_2.0.2 stringi_1.4.6 fs_1.4.1 remotes_2.1.1 testthat_2.3.2 xml2_1.3.2
[50] ellipsis_0.3.0 generics_0.0.2 vctrs_0.2.4 openxlsx_4.1.4 tools_4.0.0 glue_1.4.0 hms_0.5.3
[57] processx_3.4.2 pkgload_1.0.2 colorspace_1.4-1 sessioninfo_1.1.1 rvest_0.3.5 memoise_1.1.0 haven_2.2.0
[64] usethis_1.6.1
while this is the sessionInfo of a colleague of mine in Italy:
sessionInfo()
R version 3.6.3 (2020-02-29)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Catalina 10.15.4
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] gtrendsR_1.4.4
loaded via a namespace (and not attached):
[1] Rcpp_1.0.3 assertthat_0.2.1 dplyr_0.8.4 crayon_1.3.4 grid_3.6.3 R6_2.4.1 jsonlite_1.6.1
[8] lifecycle_0.1.0 gtable_0.3.0 magrittr_1.5 scales_1.1.0 ggplot2_3.2.1 pillar_1.4.3 rlang_0.4.4
[15] curl_4.3 lazyeval_0.2.2 rstudioapi_0.11 tools_3.6.3 glue_1.3.1 purrr_0.3.3 munsell_0.5.0
[22] compiler_3.6.3 pkgconfig_2.0.3 colorspace_1.4-1 tidyselect_1.0.0 tibble_2.1.3
As you see, very different platforms but with the same errors. Have Google changed the API again?
Thanks for your attention.
Have the same issue!
I have the same issue.
@guaribr @croxycraxer @deanfantazzini Do you have the issue when you use the Paramter onlyInterest=TRUE?
Yes. Then it is the same error. The function related_topics doesn't work anymore... this needs fixing.
Yes, it works, thanks.
P.S. Of course, if a user needs all the other information reported by Google Trends this is clearly not sufficient. (I am lucky that I need only the data about interest over time )
This has been solved. Please use the dev version for now until the new version is on CRAN. @eddelbuettel, are you ok with releasing it?
Sure, if it passes tests and manages to fix a bug annoying scores of people what's not to love? ;-)
@eddelbuettel Do you know why I have this error about data.table
installation?
https://win-builder.r-project.org/645lT7f4wt68/00install.out
Looks like a temp snafu at CRAN? Maybe race condition with data.table being installed / upgraded?
Can you try RHub's windows builders?
I have the same data.table
error.
https://builder.r-hub.io/status/gtrendsR_1.4.4.9000.tar.gz-2c1d4d7d00484272b9ea2a1b07740387
Same also on Ubuntu 16.04:
https://builder.r-hub.io/status/gtrendsR_1.4.4.9000.tar.gz-f705fb9ed4224276b957e4926aad53cb
Looking at DESCRIPTION we see it is not listed.
"Computers still deterministic, News at 11pm" ;-)
awww, it was never listed and build were ok? Thanks :)
I have no idea. I doubt it passed if it was used but not listed -- that is a key feature of R CMD check
to find these mismatches, and has been there a loooong time.
I don't follow the package that closely as @JBleher can be trusted to duct tape^Hre-engineer whatever Google breaks so it is really between you and him.
I don't understand. Have I broken something with the last PR ?
Thanks! That was fast!
@JBleher It as on my side. Everything is fine now.
I've just reinstalled gtrendsR and it works. Thanks+
Works fine for me as well. Thanks @PMassicotte and @JBleher
Works also for me!