Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 208162

R curl::has_internet() FALSE even though there are internet connection

$
0
0

My problem arose when downloading data from EuroSTAT using the R package eurostat:

# Population data by NUTS3
pop_data <- subset(eurostat::get_eurostat("demo_r_pjangrp3", time_format = "num"),
                   (age == "TOTAL") & (sex == "T") & 
                   (nchar(trimws(geo)) == 5))[, c("time","geo","values")]

#Fejl i eurostat::get_eurostat("demo_r_pjangrp3", time_format = "num") : 
#  You have no internet connection, please reconnect!

Seaching, I have found out that it is the statement (in the eurostat-package code): if (curl::has_internet() {stop("You have no inernet connection, please connnect") that cause the problem.

However, I have interconnection and can e.g. ping www.eurostat.eu

I have tried curl::has_internet() on different computers, all with internet connection. On some it work (respond TRUE) on others it don't.

I have talked with our IT department, and we tried if it could be a firewall problem. Removing the firewall, did not solve the problem.

Unfortunately, I am ignorant on network-settings. Hence, when trying to read the documentation for the curl-package I am lost.

Downloading data from EuroSTAT using the command above have worked for the last at least 2 years, and for me the problem arose at the start of 2020 (January 7).

Hope someone can help with this, as downloading population data from EuroSTAT is a mandatory part in more of my/our regular work.


Viewing all articles
Browse latest Browse all 208162

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>