lal
June 9, 2020, 1:14am
1
I 'm using NOAA server to download a stacked raster data.
a<- stack("https://tgftp.nws.noaa.gov/SL.us008001/ST.opnl/DF.gr2/DC.ndfd/AR.conus/VP.001-003/ds.fret.bin ")
I created a shiny app that works fine on my system. But when I deploy it I get an error. On checking the logs I found that the error is related to the link to the raster file.
For some reason, the shiny-server goes to
https://tgftp.nws.noaa.gov/SL.us008001/ST.opnl/DF.gr2/DC.ndfd/AR.conus/VP.001-003/ds.fret.bin.ver .
.ver. at the end of the link results in the error. which is not in y original script.
How can I go around this?
Thanks in advance.
I opened an issue for you,
opened 08:17AM - 09 Jun 20 UTC
closed 11:49PM - 07 Nov 20 UTC
The following is based on the report at : https://community.rstudio.com/t/facing… -error-in-bin-files-while-deploying-shiny/69149
I have produced a reprex:
```r
library(rgdal)
library(raster)
library(shiny)
a <- raster::stack("https://tgftp.nws.noaa.gov/SL.us008001/ST.opnl/DF.gr2/DC.ndfd/AR.conus/VP.001-003/ds.fret.bin", native = TRUE)
ui <- fluidPage(
verbatimTextOutput("stackresult")
)
server <- function(input, output, session) {
output$stackresult <- renderPrint({
a
})
}
shinyApp(ui, server)
```
This does produce output when run locally, but upon deployment to shinyapps.io:
```
The application failed to start (exited with code 1).
Loading required package: sp
rgdal: version: 1.5-8, (SVN revision 990)
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 2.2.2, released 2017/09/15
Path to GDAL shared files: /usr/share/gdal/2.2
GDAL binary built with GEOS: TRUE
Loaded PROJ runtime: Rel. 4.9.2, 08 September 2015, [PJ_VERSION: 492]
Path to PROJ shared files: (autodetected)
Linking to sp version:1.4-0
To mute warnings of possible GDAL/OSR exportToProj4() degradation,
use options("rgdal_show_exportToProj4_warnings"="none") before loading rgdal.
Error in .local(.Object, ...) :
An error occurred while creating a virtual connection to the DAP server:
Error while reading the URL: https://tgftp.nws.noaa.gov/SL.us008001/ST.opnl/DF.gr2/DC.ndfd/AR.conus/VP.001-003/ds.fret.bin.ver.
The OPeNDAP server returned the following message:
Not Found: The data source or server could not be found.
Often this means that the OPeNDAP server is missing or needs attention;
Please contact the server administrator.
Error in value[[3L]](cond) :
Cannot create a RasterLayer object from this file. (file does not exist)
Calls: local ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted
system
Closed
August 2, 2020, 12:31pm
3
This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.