【问题标题】:RNeo4j errors: Could not resolve host: http when issue graph = startGraph("http:/localhost:7474/db/data") in RStudioRNeo4j 错误:无法解析主机:RStudio 中的问题图 = startGraph("http:/localhost:7474/db/data") 时的 http
【发布时间】:2015-01-04 04:16:49
【问题描述】:

当我尝试调用 RNeo4j 的 startGraph 时,它一直给我错误无法解析主机:http。我验证了 neo4j 服务器正在运行,本地和远程主机的浏览器返回正确的答案,但不是来自 RStudio。我试过 R 3.1.2 和 R 3.1.0。两人都给出了同样的回应。 sessionInfo() 显示加载了必要的库:

> sessionInfo()
R version 3.1.0 (2014-04-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United States.1252 
[2] LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] RJSONIO_1.3-0  RNeo4j_1.0     rJava_0.9-6    RCurl_1.95-4.5
[5] rjson_0.2.15   bitops_1.0-6  

loaded via a namespace (and not attached):
[1] codetools_0.2-8 devtools_1.6.1  httr_0.6.1      igraph_0.7.1   
[5] pryr_0.1        Rcpp_0.11.3     stringr_0.6.2   tools_3.1.0    
> graph = startGraph("http:/localhost:7474/db/data")
Error in function (type, msg, asError = TRUE)  : 
  Could not resolve host: http
> 

【问题讨论】:

    标签: neo4j connect host r-neo4j


    【解决方案1】:

    确保包含尾部正斜杠并使用http://

    graph = startGraph("http://localhost:7474/db/data/")
    

    让我知道这是否有效。

    【讨论】:

    • 刚试过。它得到相同的错误消息: > graph = startGraph("http:/localhost:7474/db/data/") 函数错误(类型,msg,asError = TRUE):无法解析主机:http > 我正在调查http_request 和 curlPerform 函数,如果这些参数不匹配会导致这个错误吗?
    • 哎呀,我的错。只是错字:(。我使用的是相同字符串的剪切和粘贴。非常感谢!
    猜你喜欢
    • 2014-11-20
    • 2013-04-13
    • 2015-01-26
    • 2021-06-03
    • 2020-07-12
    • 1970-01-01
    • 2016-12-18
    • 1970-01-01
    • 2022-08-15
    相关资源
    最近更新 更多