Repository navigation
Replies: 4 comments 6 replies
|
Sounds reasonable. Do you want to do a PR? |
|
It doesn't seem to work. Does it work on your machine? In the case of using url = "api.scb.se" this line doesn't work: This however does: Unfortunately, even if I do pxweb_interactive("https://api.scb.se") it still doesn't work. Chat GPT suggests that the url gets shortened in this section in pxweb/R /pxweb_interactive.R So even though I'm using https://api.scb.se, has_internet() will get api.scb.se which doesn't work (at least on my machine). EDIT: in parse_url(x) this happens: url_parsed <- httr::parse_url("https://api.scb.se"). And url_parsed$hostname the becomes "api.scb.se" |
|
in |
|
Hmmm. I think I overdid it. I just found this function that should be all that is needed, I think. A similar problem was identified in 2020 and seem to have been fixed. curl also enables handling proxies etc. Could you try if this works for you, then this should be an easy fix, I think. |
Uh oh!
There was an error while loading. Please reload this page.
I'm not that good at this but pxweb stopped working when my job changed dns configuration. I got it working if I changed the function has_internet(). I ran this in my session:
assignInNamespace("has_internet", function(host) TRUE, ns = "pxweb")
It appears that has_internet() s use of nslookup() won't function with our dns configuration since it needs "local lookup". Maybe one can use GET to check internet connection instead of nslookup?
All reactions