Dear collegues,
I have set up a shiny webpage with data which should be renewed every night. The program structure is almost similar to the post of Jean-Pierre Gattuso earlier.
For this I send a new datafile every night to my dropbox account and now I try to convince my app to download this file, however with no success so far. The app runs perfect on my computer incl. data download from Dropbox but refuses to do the data download as soon as I publish the app to
shini.io.
In the logfile from my shiny account if get:
2016-08-28T12:14:45.657018+00:00 shinyapps[120758]: in Dropbox
2016-08-28T12:14:45.663051+00:00 shinyapps[120758]: 7: connect$retry
2016-08-28T12:14:45.663218+00:00 shinyapps[120758]: Error in gzfile(file, "rb") : kann Verbindung nicht öffnen
2016-08-28T12:14:45.657421+00:00 shinyapps[120758]: Warnung in gzfile(file, "rb")
2016-08-28T12:14:45.663049+00:00 shinyapps[120758]: 11: doTryCatch
2016-08-28T12:14:45.657423+00:00 shinyapps[120758]: kann komprimierte Datei 'droptoken.rds' nicht öffnen. Grund evtl. 'No such file or directory' -> cannot open compressed file 'droptoken.rds'. Possibly "No such file or directory"
2016-08-28T12:14:45.663051+00:00 shinyapps[120758]: 8: tryCatch
2016-08-28T12:14:45.658137+00:00 shinyapps[120758]: Warnung: Error in gzfile: kann Verbindung nicht öffnen
2016-08-28T12:14:45.663050+00:00 shinyapps[120758]: 9: tryCatchList
2016-08-28T12:14:45.663054+00:00 shinyapps[120758]: 1: local
2016-08-28T12:14:45.663045+00:00 shinyapps[120758]: Stack trace (innermost first):
2016-08-28T12:14:45.663052+00:00 shinyapps[120758]: 5: eval
2016-08-28T12:14:45.663047+00:00 shinyapps[120758]: 54: gzfile+
2016-08-28T12:14:45.663052+00:00 shinyapps[120758]: 6: eval
2016-08-28T12:14:45.663047+00:00 shinyapps[120758]: 53: readRDS
2016-08-28T12:14:45.663050+00:00 shinyapps[120758]: 10: tryCatchOne
2016-08-28T12:14:45.663054+00:00 shinyapps[120758]: 2: eval.parent
2016-08-28T12:14:45.663048+00:00 shinyapps[120758]: 52: server [/srv/connect/apps/svl_ferrybox/app.R#53]
2016-08-28T12:14:45.663053+00:00 shinyapps[120758]: 4: eval
2016-08-28T12:14:45.663048+00:00 shinyapps[120758]: 13: runApp
2016-08-28T12:14:45.663049+00:00 shinyapps[120758]: 12: fn
2016-08-28T12:14:45.663053+00:00 shinyapps[120758]: 3: eval
The code to read the file is:
server <- function(input, output) {
message("in Dropbox")
token <- readRDS("droptoken.rds")
drop_acc(dtoken = token)
drop_get("svl_ferrybox_all_select.avg.hour.csv", overwrite = TRUE)
svl_ferrybox_all_select.avg.hour <- read.csv("svl_ferrybox_all_select.avg.hour.csv", header=TRUE)
svl_ferrybox_all_select.avg.hour$datetime = strptime(svl_ferrybox_all_select.avg.hour$datetime,"%Y-%m-%d %H:%M:%S")
svl_ferrybox_all_select.avg.hour$datetime <-as.POSIXct(svl_ferrybox_all_select.avg.hour$datetime)
svl_ferrybox_all_select.avg.hour$date <- as.Date(svl_ferrybox_all_select.avg.hour$date)
data.r <- reactive({
a = dplyr::filter(svl_ferrybox_all_select.avg.hour, date > input$dateRange[1] &
date < input$dateRange[2])
return(a)
}
)
........
So the log says that there is possibly no droptoken.rds on the server??
Can anybody help how to put this file to the place where it is needed?
I tried all recommendations I found in the internet with no success.
Thanks a lot in advance?
Philipp