我的操作系统是ubuntu。
我在rstudio中成功地运行了一个闪亮的应用程序。
我已经复制了闪亮服务器文件中的所有文件。但是,当我试图从闪亮的服务器上运行应用程序时,我在浏览器中看到了这个错误:
ERROR: An error has occurred. Check your logs or contact the app author for clarification.
然而,当我转到日志时,我找不到特定应用程序的日志。
这类问题有什么解决办法吗?
我在RStudio的免费闪亮服务器上有一个闪亮的应用程序,它使用了相当数量的库,这会导致计算时间缓慢。UI加载的时间是可以接受的。我将库放在global.R文件中,以便在用户之间共享它们。
# All libraries are in global.R for faster start times
source("<path to global.R>", local = T)
ui <- fluidPage(
)
server <- function(input, output, session) {
}
shinyApp(ui, server)
我正在尝试在flexdashboard闪亮的应用程序中对另一个输入做出反应。
下面是df示例:
> dat = data.frame(id = LETTERS[1:10],g1 = c(rep(24,5),rep(35,5)),g2 = c(2401,2401,2402,2402,2403,3501,3501,3502,3503,3503),val = seq(from = 10, to = 100, by = 10))
> dat
id g1 g2 val
1 A 24 2401 10
2 B 24 2401 20
3 C 24 2402 30
4
现在,我在一个闪亮的应用程序的global.R文件中加载大约100mb的数据。虽然该应用程序在本地运行良好,但Shiny Server经常崩溃。通常,罪魁祸首是以下错误(在等待应用程序加载大约30秒后):
An error has occurred
The application failed to start.
The application took too long to respond.
我已经尝试了app_init_timeout的所有可能的设置,包括设置为-1,但仍然没有成功。
我想知道一个闪亮的服务器会话中可以加载的数据量是否有一个上限。
下面是闪亮的服务器配置文件:
# I
以下两个片段似乎具有相同的行为:
def sqr(a):
time.sleep(1.2)
print 'local {}'.format(os.getpid())
if a == 20:
raise Exception('fff')
return a * a
pool = Pool(processes=4)
答:
try:
r = [pool.apply_async(sqr, (x,)) for x in range(100)]
pool.close()
for item in r:
我知道这个问题以前已经问过很多次了,所以和其他地方也一样。我还是做不到。如果我的英语不好,我很抱歉
在linux中删除文件要简单得多。只是os.remove(my_file)做了这件事,但是在windows中
os.remove(my_file)
WindowsError: [Error 32] The process cannot access the file because it is being used by another process: (file-name)
我的代码:
line_count = open(my_file, mode='r')