使用plotly api_create

时间:2018-07-11 14:38:53

标签: r plotly jsonlite

尝试使用api_create将Plotly地块发布到其网站时遇到问题。我继续收到以下错误:

Error: lexical error: invalid char in json text.
                                   <!DOCTYPE HTML PUBLIC "-//IETF/
                 (right here) ------^ 

具有追溯:

15. parse_string(txt, bigint_as_char) 
14. parseJSON(txt, bigint_as_char) 
13. fromJSON_string(txt = txt, simplifyVector = simplifyVector, 
simplifyDataFrame = simplifyDataFrame, 
simplifyMatrix = simplifyMatrix, flatten = flatten, ...) 
12. jsonlite::fromJSON(x, simplifyDataFrame = FALSE, simplifyMatrix = FALSE, 
...) 
11. from_JSON(httr::content(resp, as = "text", type = resp[["headers"]]
[["content-type"]], 
encoding = "UTF-8")) 
10. json_content(relay_error(resp)) 
9. process.default(resp) 
8. process(resp) 
7. structure(process(resp), class = "api") 
6. api("grids", "POST", to_JSON(bod)) 
5. api_create_grid(pSrcFlat, filename = filename, fileopt = fileopt, 
sharing = sharing) 
4. api_srcify(x, filename = gridname, fileopt = fileopt, sharing = sharing) 
3. api_create.plotly(p) 
2. api_create(p) 
1. RunID_Plot("A-3139") 

打包版本:

> packageVersion("jsonlite")
[1] ‘1.5.9000’
> packageVersion("plotly")
[1] ‘4.7.1’

我尝试按照以下示例操作,https://github.com/jeroen/jsonlite/issues/230无济于事。这个问题似乎与绘图类型无关,因为它发生在多种不同类型的绘图中。

可能与上班有关,但尚未在家中进行测试(从这里https://github.com/ropensci/plotly/issues/1047

预先感谢

0 个答案:

没有答案