【发布时间】:2018-02-14 05:15:25
【问题描述】:
我很惊讶地看到一个突然的错误,我的 ShinyApp 停止工作,出现一个未知错误,说“输入字符串 1 是无效的 UTF-8”。即使在昨天,该应用程序也可以正常运行,但是突然停止了。
下面是我运行runApp()时的错误描述
> runApp()
Listening on http://127.0.0.1:3726
Warning: Error in sub: input string 1 is invalid UTF-8
Stack trace (innermost first):
1: runApp
Error : input string 1 is invalid UTF-8
我的会话信息:
> library(shiny); sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.6
Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib
locale:
[1] C/UTF-8/C/C/C/C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] shiny_1.0.5
loaded via a namespace (and not attached):
[1] compiler_3.4.1 R6_2.2.2 htmltools_0.3.6 Rcpp_0.12.12
[5] digest_0.6.12 xtable_1.8-2 httpuv_1.3.5 mime_0.5
有人遇到过类似的错误吗?感谢有关如何修复此错误的任何指针。我在网上搜索了一段时间的解决方案,但没有找到任何相关的。
感谢您的宝贵时间。
谢谢,
【问题讨论】:
-
我遇到了同样的问题,并在我的数据中通过replacing non UTF-8 characters 解决了它。
validUTF8()帮助我识别非 UTF-8 字符。