springerQuarantineBooksR icon indicating copy to clipboard operation
springerQuarantineBooksR copied to clipboard

Warnings appearence

Open JC93OV opened this issue 4 years ago • 7 comments

Hi! First of all, thanks for the code! I work with R 3.6.3 version and I used this lines to download the ebooks:

setwd("my path") download_springer_book_files()

At the end of the process, it appear on the console:

Warning messages: 1: In if (!dir.exists(current_folder)) { : the condition has length > 1 and only the first element will be used 2: In if (!dir.exists(current_folder)) { : the condition has length > 1 and only the first element will be used

And I didn't get the books. What am I supposed to do?

JC93OV avatar Apr 30 '20 21:04 JC93OV

Finally, I got the books. I set the path manually (without code), then I rerun the lines and got the books, but the lines still persist, but without problems.

JC93OV avatar May 01 '20 10:05 JC93OV

Currently, the package navigates inside the repo generated during the iterations. This is probably not the best approach since if you stop the downloading in the middle of the generation, your R session will probably be inside in one of the repos created. And this might be causings, as the "current_folder" might not be a single element. An alternative was open in https://github.com/renanxcortes/springerQuarantineBooksR/pull/4, but changed later. The solution would be creating files with the entire path on it and avoiding this "travelling through repos" behavior. Happy for PRs in that sense.

renanxcortes avatar May 03 '20 00:05 renanxcortes

Hi,

I am having the same warning message:

**_Warning messages:

1: In if (!dir.exists(current_folder)) { : the condition has length > 1 and only the first element will be used 2: In if (!dir.exists(current_folder)) { : the condition has length > 1 and only the first element will be used_**

I am programming in R and also using a MacBook. Not sure if this is the reason why I am getting this warning. Also my files are 14 kb and I can't open the book. It gives the following message when I open a book:

The file "Thermodynamics and Energy Conversion_2014.pdf" cannot be opened. It may be damaged or have a file structure that Preview does not recognize.

Malik-97 avatar Jun 05 '20 15:06 Malik-97

Hi,

I am having the same warning message:

**_Warning messages:

1: In if (!dir.exists(current_folder)) { : the condition has length > 1 and only the first element will be used 2: In if (!dir.exists(current_folder)) { : the condition has length > 1 and only the first element will be used_**

I am programming in R and also using a MacBook. Not sure if this is the reason why I am getting this warning. Also my files are 14 kb and I can't open the book. It gives the following message when I open a book:

The file "Thermodynamics and Energy Conversion_2014.pdf" cannot be opened. It may be damaged or have a file structure that Preview does not recognize.

Hi, @Malik-97 , currently, this package has a critical issue (https://github.com/renanxcortes/springerQuarantineBooksR/issues/53) due to a reCaptcha step that Springer added in their website. Therefore, the functions will produce flawed files. In the ReadMe this is highlighted in the upper part.

renanxcortes avatar Jun 05 '20 15:06 renanxcortes

@renanxcortes, Thankyou for your response. I will wait till the solution is found

Malik-97 avatar Jun 05 '20 15:06 Malik-97

@Malik-97, if I may, you can download all books here or only the desired ones here.

AntoineSoetewey avatar Jun 05 '20 15:06 AntoineSoetewey

@AntoineSoetewey , Thankyou very much!

Malik-97 avatar Jun 05 '20 15:06 Malik-97