【问题标题】:shiny-server Failed to load resource: the server responded with a status of 500 (Internal Server Error)shiny-server 加载资源失败:服务器响应状态为 500(内部服务器错误)
【发布时间】:2014-12-12 13:32:54
【问题描述】:

我在 centos 6 上使用了 shiny-server,它适用于我的大多数应用程序,但有一些问题 当我将它与 rCharts 一起使用时(ggplot2 可以)。 chrome给我一条消息“加载资源失败:服务器响应状态为500(内部服务器错误)”,但我可以在本地Windows7系统上运行相同的代码。并且没有关于它的错误日志。它出什么问题了。 有知道怎么处理的朋友请告诉我,谢谢。

代码是:

服务器.R

require(rCharts)
shinyServer(function(input, output) {
  output$myChart <- renderChart({
    names(iris) = gsub("\\.", "", names(iris))
    p1 <- rPlot(input$x, input$y, data = iris, color = "Species", 
      facet = "Species", type = 'point')
    p1$addParams(dom = 'myChart')
    return(p1)
  })
})

#ui.R
require(rCharts)
shinyUI(pageWithSidebar(
  headerPanel("rCharts: Interactive Charts from R using polychart.js"),

  sidebarPanel(
    selectInput(inputId = "x",
     label = "Choose X",
     choices = c('SepalLength', 'SepalWidth', 'PetalLength', 'PetalWidth'),
     selected = "SepalLength"),
    selectInput(inputId = "y",
      label = "Choose Y",
      choices = c('SepalLength', 'SepalWidth', 'PetalLength', 'PetalWidth'),
      selected = "SepalWidth")
  ),
  mainPanel(
    showOutput("myChart", "polycharts")
  )
))

【问题讨论】:

    标签: r internal rcharts shiny-server


    【解决方案1】:

    是的!我终于检查出来了,因为我没有更改应用程序的模式(ui.R和server.R) 到可读模式!在ui.R和server.R的chmod 755之后,效果很好。

    【讨论】:

    • 嗨,我也有同样的问题。什么是可读模式?谢谢
    • 这个答案没有任何意义。
    猜你喜欢
    • 2013-04-16
    • 1970-01-01
    • 2018-01-22
    • 2014-11-24
    • 2021-07-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多