renanxcortes / springerQuarantineBooksR

Download all books made available by Springer during the COVID-19 quarantine!
131 stars 41 forks source link

http_error(get_file) #32

Closed paugrau closed 4 years ago

paugrau commented 4 years ago

Good job with the package! By the way, when trying to run "download_springer_book_files()" I get an error. The code I run: devtools::install_github("renanxcortes/springerQuarantineBooksR") library(springerQuarantineBooksR) setwd('G:/.../Springer Ebooks') download_springer_book_files()

And the error: Downloading title latest editions. Processing... Fundamentals of Power Electronics (1 out of 391) Error in http_error(get_file) : could not find function "http_error"

Is it common? Is there a way to solve it? By the way, i use R version 4.0.0 (2020-04-24).

Thank you,

Pau

renanxcortes commented 4 years ago

Hi @pgrau7 , thanks for opening this issue. This is because the package depends on this function of httr. I recently added this function in the dependency list (https://github.com/renanxcortes/springerQuarantineBooksR/blob/ca064e1ad2fa75f89ff6c252c74c0897701081d0/R/download_springer_book.R#L10). Could you please try running the following snippet:

# Add 'force = T' argument
devtools::install_github("renanxcortes/springerQuarantineBooksR", force = T)
library(springerQuarantineBooksR)
setwd("your_pgrau7_path")
download_springer_book_files()

Did it work on your side?

Cheers, Renan

renanxcortes commented 4 years ago

I'm pretty sure this was fixed in https://github.com/renanxcortes/springerQuarantineBooksR/pull/33. Please re-install and try running again. If this happens again, please feel to open another issue, @pgrau7 .

Best, Renan

paugrau commented 4 years ago

Works perfectly! Thank you!