richelbilderbeek / aureole

Browse the Encyclopedia Of Life from R
0 stars 0 forks source link

Error: download_image_urls_from_name and download_search_results fail on Windows #3

Open Neves-P opened 4 years ago

Neves-P commented 4 years ago

Hi Richel! Thanks for making this, it's a really great idea! I did run into an error, which maybe is related to running the code on Windows/my machine? In any case, here is a MRE that I hope can give you some information, I'm happy to do more testing and run more things on my end if it helps 😄


df <- aureole::download_image_urls_from_name("Homo sapiens")
#> Error in function (type, msg, asError = TRUE) : error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version

df <- aureole::download_search_results("Homo sapiens")
#> Error in function (type, msg, asError = TRUE) : error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version

packageVersion("aureole")
#> [1] '2.0'
sessionInfo()
#> R version 3.6.1 (2019-07-05)
#> Platform: x86_64-w64-mingw32/x64 (64-bit)
#> Running under: Windows 10 x64 (build 17763)
#> 
#> Matrix products: default
#> 
#> locale:
#> [1] LC_COLLATE=English_Europe.1252  LC_CTYPE=English_Europe.1252   
#> [3] LC_MONETARY=English_Europe.1252 LC_NUMERIC=C                   
#> [5] LC_TIME=English_Europe.1252    
#> 
#> attached base packages:
#> [1] stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> loaded via a namespace (and not attached):
#>  [1] Rcpp_1.0.2      digest_0.6.21   bitops_1.0-6    magrittr_1.5   
#>  [5] evaluate_0.14   highr_0.8       rlang_0.4.0     stringi_1.4.3  
#>  [9] rmarkdown_1.16  tools_3.6.1     stringr_1.4.0   RCurl_1.95-4.12
#> [13] xfun_0.10       yaml_2.2.0      compiler_3.6.1  htmltools_0.4.0
#> [17] knitr_1.25      aureole_2.0

Created on 2019-10-21 by the reprex package (v0.3.0)

richelbilderbeek commented 4 years ago

Awesome, thanks for trying it out and submitting this Windows bug report!

Hmmm, it appears to do with the https protocol I use instead of http. Will create a new version today and let you know :+1:

richelbilderbeek commented 4 years ago

Hmm, after some Ducking, I find this has nothing to do with aureole, instead I learn one should consider:

I am sorry I cannot do more. I am willing to take a look at your university's (I assume) computer. Or is this a home computer?

richelbilderbeek commented 4 years ago

@Neves-P: I will work on -at least- a better error message. May I ask you to volunteer to try again if I did so?

Neves-P commented 4 years ago

Hey @richelbilderbeek I haven't had the time to test out the updates you mentioned earlier, but will do so today (same error seems to happen on my laptop) but I can definitely test out the error message and update! Shall I wait for your go to test the error message and then the updates to check if the issue is fixed? I can also try the updates now and report back and they try the error message at university. How does that sound?

richelbilderbeek commented 4 years ago

Shall I wait for your go to test the error message and then the updates to check if the issue is fixed? I can also try the updates now and report back and they try the error message at university. How does that sound?

Whatever you like best :+1:

If you find out what causes the error, I would enjoy you reporting here for future user :rainbow:

Neves-P commented 4 years ago

Thanks for looking into it!

I have tried updating what you mentioned and the problem still persists, see a MRE below.

A note: R behaves weirdly about the windows PATH; even though I have updated curl and added it to the top of the PATH on windows (and the most recent version is called through the command line as expected), R still calls the old version (7.55) for some reason. As 7.55 is part of the windows installation (stored in System32) I haven't been able to remove it from the PATH, even though it now ranks lower in the order. This may be causing the issue, but after searching I was unable to find a solution, other than the expected change order of the PATH in the system environment variables, which doesn't work.

I'm afraid I'm out of ideas... openssl and git were updated without issues and the problem persists, so it either has to do with curl or the problem lies elsewhere. I can check with the office computer to see if the same thing applies.

df <- aureole::download_image_urls_from_name("Homo sapiens")
#> Error in function (type, msg, asError = TRUE) : error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version

df <- aureole::download_search_results("Homo sapiens")
#> Error in function (type, msg, asError = TRUE) : error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version

print(system("git --version ", intern = TRUE))
#> [1] "git version 2.23.0.windows.1"
print(system("openssl version ", intern = TRUE))
#> [1] "OpenSSL 1.1.1d  10 Sep 2019"
print(system("curl -V", intern = TRUE))
#> [1] "curl 7.55.1 (Windows) libcurl/7.55.1 WinSSL"                                           
#> [2] "Release-Date: [unreleased]"                                                            
#> [3] "Protocols: dict file ftp ftps http https imap imaps pop3 pop3s smtp smtps telnet tftp "
#> [4] "Features: AsynchDNS IPv6 Largefile SSPI Kerberos SPNEGO NTLM SSL "
print(system("where curl", intern = TRUE))
#> [1] "C:\\cygwin64\\bin\\curl.exe"     "C:\\Windows\\System32\\curl.exe"

Sys.info()
#>         sysname         release         version        nodename 
#>       "Windows"        "10 x64"   "build 17134" "PORTATILPEDRO" 
#>         machine           login            user  effective_user 
#>        "x86-64"         "Pedro"         "Pedro"         "Pedro"
sessionInfo()
#> R version 3.6.1 (2019-07-05)
#> Platform: x86_64-w64-mingw32/x64 (64-bit)
#> Running under: Windows 10 x64 (build 17134)
#> 
#> Matrix products: default
#> 
#> locale:
#> [1] LC_COLLATE=Portuguese_Portugal.1252 
#> [2] LC_CTYPE=Portuguese_Portugal.1252   
#> [3] LC_MONETARY=Portuguese_Portugal.1252
#> [4] LC_NUMERIC=C                        
#> [5] LC_TIME=Portuguese_Portugal.1252    
#> 
#> attached base packages:
#> [1] stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> loaded via a namespace (and not attached):
#>  [1] Rcpp_1.0.2      digest_0.6.21   bitops_1.0-6    magrittr_1.5   
#>  [5] evaluate_0.14   highr_0.8       rlang_0.4.0     stringi_1.4.3  
#>  [9] rmarkdown_1.16  tools_3.6.1     stringr_1.4.0   RCurl_1.95-4.12
#> [13] xfun_0.10       yaml_2.2.0      compiler_3.6.1  htmltools_0.4.0
#> [17] knitr_1.25      aureole_2.0

Created on 2019-10-27 by the reprex package (v0.3.0)

richelbilderbeek commented 4 years ago

Cool! Sad thing: I can reproduce this error on AppVeyor as well :frowning_face: