Closed TristanLouthRobins closed 3 years ago
Thanks for reporting this. We’re aware and this is a duplicate of, https://github.com/ropensci/bomrang/issues/133, which has been fixed in the version that’s ready for submission to CRAN today.
If you need data in the meantime while we wait on CRAN, this seems to be an RStudio issue, not an R issue per se. You might try run your script in an R session that's not in RStudio.
My apologies for the duplication, thanks Adam! Not need for data today; it can wait.
Thanks again,
Tristan
Note that when I encountered this issue (#137), it wasn't in an RStudio session! It was in a regular R session (although running inside Linux using WSL on Windows)
@rensa, can you confirm an error 403 forbidden and changing the useragent worked for you?
Also, is it still happening with the latest release?
It's still happening to me with the latest release (commit 62233b4, following #134). However, when I run the test request with xml2
, I don't have any problems even if I don't change my user agent:
> xml2::read_html("http://www.bom.gov.au")
{html_document}
<html lang="en">
[1] <head>\n<meta http-equiv="Content-Type" content="text/html; charset=UTF-8 ...
[2] <body>\n\n<div id="pageheight">\n\n<div id="pagewrap">\n\n<h1 class="acce ...
My user agent option doesn't appear to be set at all:
> options(HTTPUserAgent)
Error in options(HTTPUserAgent) : object 'HTTPUserAgent' not found
Changing the user agent doesn't solve it :/
No worries! Re-opening #137.
Session Info
```r The get_historical_weather() call is currently throwing an error with connecting to BOM's database as below: Error in file(con, "r") : cannot open the connection to 'http://www.bom.gov.au/climate/data/lists_by_element/alphaAUS_136.txt' In addition: Warning message: In file(con, "r") : cannot open URL 'http://www.bom.gov.au/climate/data/lists_by_element/alphaAUS_136.txt': HTTP status was '403 Forbidden' ```