Hi, i'm new in R Shiny and I would like deploy a web application but I have some error and I don't understand why. My app run without any problem on an external browser. So when i want to deploy my app I have this message ;
Linking to GEOS 3.5.1, GDAL 2.1.3, proj.4 4.9.2
rgeos version: 0.3-26, (SVN revision 560)
GEOS runtime version: 3.5.1-CAPI-1.9.1 r4246
Linking to sp version: 1.2-7
Polygon checking: TRUE
rgdal: version: 1.2-20, (SVN revision 725)
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 2.1.3, released 2017/20/01
Path to GDAL shared files: /usr/share/gdal/2.1
GDAL binary built with GEOS: TRUE
Loaded PROJ.4 runtime: Rel. 4.9.2, 08 September 2015, [PJ_VERSION: 492]
Path to PROJ.4 shared files: (autodetected)
Linking to sp version: 1.2-7
Error in value[3L] :
invalid multibyte string at '<80>3.5 b<69>llion'
Calls: local ... tryCatch -> tryCatchList -> tryCatchOne ->
Execution halted
Someone have an idea for how I can solve that?
josh
June 8, 2018, 12:57pm
2
What is the output of sessionInfo()
?
What is nature of the shape file you are loading with GDAL? That is, what is its encoding?
For sessionInfo() I have that :
Session info ---------------------------------------------------------------------------------
setting value
version R version 3.5.0 (2018-04-23)
system x86_64, mingw32
ui RStudio (1.1.447)
language (EN)
collate English_Ireland.1252
tz Europe/London
date 2018-06-08
Packages -------------------------------------------------------------------------------------
package * version date source
assertthat 0.2.0 2017-04-11 CRAN (R 3.5.0)
base * 3.5.0 2018-04-23 local
bindr 0.1.1 2018-03-13 CRAN (R 3.5.0)
bindrcpp 0.2.2 2018-03-29 CRAN (R 3.5.0)
bitops 1.0-6 2013-08-17 CRAN (R 3.5.0)
class 7.3-14 2015-08-30 CRAN (R 3.5.0)
classInt 0.2-3 2018-04-16 CRAN (R 3.5.0)
colorspace 1.3-2 2016-12-14 CRAN (R 3.5.0)
compiler 3.5.0 2018-04-23 local
crosstalk 1.0.0 2016-12-21 CRAN (R 3.5.0)
curl 3.2 2018-03-28 CRAN (R 3.5.0)
datasets * 3.5.0 2018-04-23 local
DBI 1.0.0 2018-05-02 CRAN (R 3.5.0)
devtools * 1.13.5 2018-02-18 CRAN (R 3.5.0)
digest 0.6.15 2018-01-28 CRAN (R 3.5.0)
dplyr * 0.7.4 2017-09-28 CRAN (R 3.5.0)
e1071 1.6-8 2017-02-02 CRAN (R 3.5.0)
ggplot2 * 2.2.1 2016-12-30 CRAN (R 3.5.0)
glue 1.2.0 2017-10-29 CRAN (R 3.5.0)
graphics * 3.5.0 2018-04-23 local
grDevices * 3.5.0 2018-04-23 local
grid 3.5.0 2018-04-23 local
gtable 0.2.0 2016-02-26 CRAN (R 3.5.0)
htmltools * 0.3.6 2017-04-28 CRAN (R 3.5.0)
htmlwidgets 1.2 2018-04-19 CRAN (R 3.5.0)
httpuv 1.4.2 2018-05-03 CRAN (R 3.5.0)
httr 1.3.1 2017-08-20 CRAN (R 3.5.0)
jsonlite 1.5 2017-06-01 CRAN (R 3.5.0)
later 0.7.2 2018-05-01 CRAN (R 3.5.0)
lattice * 0.20-35 2017-03-25 CRAN (R 3.5.0)
lazyeval 0.2.1 2017-10-29 CRAN (R 3.5.0)
leaflet * 2.0.0 2018-04-20 CRAN (R 3.5.0)
leaflet.extras * 1.0.0 2018-04-21 CRAN (R 3.5.0)
magrittr 1.5 2014-11-22 CRAN (R 3.5.0)
memoise 1.1.0 2017-04-21 CRAN (R 3.5.0)
methods * 3.5.0 2018-04-23 local
mime 0.5 2016-07-07 CRAN (R 3.5.0)
munsell 0.4.3 2016-02-13 CRAN (R 3.5.0)
openssl 1.0.1 2018-03-03 CRAN (R 3.5.0)
packrat 0.4.9-2 2018-04-20 CRAN (R 3.5.0)
pillar 1.2.2 2018-04-26 CRAN (R 3.5.0)
pkgconfig 2.0.1 2017-03-21 CRAN (R 3.5.0)
plyr 1.8.4 2016-06-08 CRAN (R 3.5.0)
promises 1.0.1 2018-04-13 CRAN (R 3.5.0)
R6 2.2.2 2017-06-17 CRAN (R 3.5.0)
raster * 2.6-7 2017-11-13 CRAN (R 3.5.0)
RColorBrewer * 1.1-2 2014-12-07 CRAN (R 3.5.0)
Rcpp 0.12.16 2018-03-13 CRAN (R 3.5.0)
RCurl 1.95-4.10 2018-01-04 CRAN (R 3.5.0)
rdrop2 * 0.8.1 2017-09-29 CRAN (R 3.5.0)
rgdal * 1.2-20 2018-05-07 CRAN (R 3.5.0)
rgeos * 0.3-26 2017-10-31 CRAN (R 3.5.0)
RJSONIO 1.3-0 2014-07-28 CRAN (R 3.5.0)
rlang 0.2.0 2018-02-20 CRAN (R 3.5.0)
RPostgreSQL 0.6-2 2017-06-24 CRAN (R 3.5.0)
rsconnect * 0.8.8 2018-03-09 CRAN (R 3.5.0)
scales * 0.5.0 2017-08-24 CRAN (R 3.5.0)
sf * 0.6-2 2018-04-25 CRAN (R 3.5.0)
shiny * 1.0.5 2017-08-23 CRAN (R 3.5.0)
shinydashboard * 0.7.0 2018-03-21 CRAN (R 3.5.0)
shinyWidgets * 0.4.3 2018-05-30 CRAN (R 3.5.0)
sp * 1.2-7 2018-01-19 CRAN (R 3.5.0)
spData 0.2.8.3 2018-03-25 CRAN (R 3.5.0)
stats * 3.5.0 2018-04-23 local
tibble 1.4.2 2018-01-22 CRAN (R 3.5.0)
tools 3.5.0 2018-04-23 local
udunits2 0.13 2016-11-17 CRAN (R 3.5.0)
units 0.5-1 2018-01-08 CRAN (R 3.5.0)
utils * 3.5.0 2018-04-23 local
withr 2.1.2 2018-03-15 CRAN (R 3.5.0)
xtable 1.8-2 2016-02-05 CRAN (R 3.5.0)
xts * 0.10-2 2018-03-14 CRAN (R 3.5.0)
yaml 2.1.19 2018-05-01 CRAN (R 3.5.0)
zoo * 1.8-1 2018-01-08 CRAN (R 3.5.0)
For the shape file, It's an extract of a klm file and I don't know what is the encoding... I don't found that in the properties sorry...
I had add encoding = 'UTF-8'
for when I download all files for my apps but I had the same output. And I saved my app in UTF-8 but it's again the same
For more information, I call all files via DropBox with this function :
dl_from_dropbox <- function(x, key) {
require(RCurl)
bin <- getBinaryURL(paste0("https://dl.dropboxusercontent.com/s/", key, "/", x),
ssl.verifypeer = FALSE)
con <- file(x, open = "wb")
writeBin(bin, con)
close(con)
message(noquote(paste(x, "read into", getwd())))
}
So for my shape file I used like that :
if (!file.exists("WSEAZonesAndExchangeBoundaries.zip")) {
dl_from_dropbox("WSEAZonesAndExchangeBoundaries.zip", "ievvw3a???????")
unzip(zipfile="WSEAZonesAndExchangeBoundaries.zip", overwrite=TRUE)
}
dta <- rgdal::readOGR(dsn = "WSEAZonesAndExchangeBoundaries",layer="Eircom-Exchange-Boundaries", stringsAsFactors=FALSE,encoding = 'UTF-8')
josh
June 8, 2018, 1:37pm
5
When I run sessionInfo()
I get a more full description of my locale:
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
Do you happen to have access to a Linux or Mac to try your application out on?
Sorry I don't used the good pack for sessionInfo(), so I have that :
locale:
[1] LC_COLLATE=English_Ireland.1252 LC_CTYPE=English_Ireland.1252
[3] LC_MONETARY=English_Ireland.1252 LC_NUMERIC=C
[5] LC_TIME=English_Ireland.1252
How can I change that?
No I'm on Windows 8, but when I run my app external (Internet Explorer) all is OK.. so I don't understand why
josh
June 8, 2018, 2:14pm
7
So shinyapps.io attempts to replicate what you have locally (except the operating system).
We capture the version of R, and the version of packages, and the locale.
I suspect that Windows is more lenient about running in a non-UTF-8 locale and loading a UTF-8 file than Linux.
The locale that shinyapps.io is logged, and you should be able to see it with rsconnect::showLogs()
:
> rsconnect::showLogs()
2018-06-08T14:13:18.955479+00:00 shinyapps[88391]: Server version: 1.6.2-2
2018-06-08T14:13:18.955505+00:00 shinyapps[88391]: LANG: en_US.UTF-8
So I have that :
2018-06-08T13:39:15.233828+00:00 shinyapps[352629]: Execution halted
2018-06-08T13:39:17.874204+00:00 shinyapps[352629]: Server version: 1.6.2-2
2018-06-08T13:39:17.874252+00:00 shinyapps[352629]: LANG: en_IE.UTF-8
2018-06-08T13:39:17.874254+00:00 shinyapps[352629]: R version: 3.5.0
I need to change my local session to UTF8???
josh
June 8, 2018, 2:41pm
9
Not sure that changing your local locale to UTF-8 would do anything remotely.
But I would suggest either testing locally on a Linux based system, or digging into the shapefile to see if you can isolate that string.
thanks for all !!
But I'm really new on r and I don't how can run that on a Linux based system
A post was merged into an existing topic: Shiny app deployment error