Open Ritzzu opened 2 years ago
I just had the same problem, commented on another issue I now see is closed... has there been a minor version release on the neo4j side that has broken the R package? Or less likely, could it be a Windows 11 thing? Comment there:
I am getting an error related to the isV4 argument: Error in if (con$is_V4 == TRUE) { : argument is of length zero.
con <- neo4j_api$new(url = "http://localhost:7474/", db = "...", user = "neo4j", password = "...", isV4 = TRUE) Error in initialize(...) : unused argument (isV4 = TRUE) con <- neo4j_api$new(url = "http://localhost:7474/", db = "...", user = "neo4j", password = "...") #, isV4 = TRUE) con
Connected at http://localhost:7474/ User: neo4j Neo4j database: [...] Neo4j version: 4.4.3 str(con) Classes 'Neo4JAPI', 'R6' Public: access: function () auth: bmVvNGo6b25lYnJpZGdl clone: function (deep = FALSE) db: [...] get_constraints: function () get_index: function () get_labels: function () get_property_keys: function () get_relationships: function () get_version: function () initialize: function (url, user, password, db = "neo4j") labels: data.frame major_version: active binding ping: function () print: function () relationships: data.frame reset_db: function (db) reset_password: function (password) reset_url: function (url) reset_user: function (user) url: http://localhost:7474 user: neo4j Private: password: [...]
Some methods work fine, but others error:
con$ping() [1] 200 con$get_version() [1] "4.4.3" con$get_labels() Error in if (con$is_V4 == TRUE) { : argument is of length zero con$is_V4 NULL
sessionInfo() R version 4.1.2 (2021-11-01) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 22000) Actually I am on Windows 11 x64
Matrix products: default
Random number generation: RNG: Mersenne-Twister Normal: Inversion Sample: Rounding
locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C LC_TIME=English_United States.1252
attached base packages: [1] stats graphics grDevices utils datasets methods base
other attached packages: [1] ggraph_2.0.5 ggplot2_3.3.5 tidygraph_1.2.0 readxl_1.3.1 neo4r_0.2.0 remotes_2.4.2
loaded via a namespace (and not attached): [1] tidyselect_1.1.2 graphlayouts_0.8.0 purrr_0.3.4 colorspace_2.0-3 vctrs_0.3.8 generics_0.1.2 viridisLite_0.4.0 [8] htmltools_0.5.2 utf8_1.2.2 rlang_1.0.2 later_1.3.0 pillar_1.7.0 glue_1.6.2 withr_2.5.0 [15] DBI_1.1.2 tweenr_1.0.2 lifecycle_1.0.1 munsell_0.5.0 gtable_0.3.0 cellranger_1.1.0 labeling_0.4.2 [22] fastmap_1.1.0 httpuv_1.6.5 curl_4.3.2 fansi_1.0.2 Rcpp_1.0.8 xtable_1.8-4 promises_1.2.0.1 [29] scales_1.1.1 jsonlite_1.8.0 farver_2.1.0 mime_0.12 gridExtra_2.3 ggforce_0.3.3 digest_0.6.29 [36] ggrepel_0.9.1 dplyr_1.0.8 shiny_1.7.1 polyclip_1.10-0 grid_4.1.2 cli_3.2.0 tools_4.1.2 [43] magrittr_2.0.2 tibble_3.1.6 crayon_1.5.0 tidyr_1.2.0 pkgconfig_2.0.3 ellipsis_0.3.2 MASS_7.3-54 [50] data.table_1.14.2 attempt_0.3.1 viridis_0.6.2 assertthat_0.2.1 httr_1.4.2 rstudioapi_0.13 R6_2.5.1 [57] igraph_1.2.11 compiler_4.1.2
Hello , I have a same issue , when I run :
`install_github("davidlrosenblum/neo4r@4.x") library(neo4r) packageVersion('neo4r')
con2neo4j <- neo4j_api$new(url = "server http url", user = "neo4j",password = "my_paasword" ,db="graph.db",isV4 = TRUE) ` or
con2neo4j <- neo4j_api$new(url = "server http url", user = "neo4j",password = "my_paasword" ,db="graph.db",is_V4 = TRUE)
or
con2neo4j <- neo4j_api$new(url = "server http url", user = "neo4j",password = "my_paasword" ,db="graph.db",isv4 = TRUE)
I have this error : Error in initialize(...) : unused argument (isV4 = TRUE)
and the only way to have a connection I run
con2neo4j <- neo4j_api$new(url = "server http url",
user = "neo4j",password = "my_paasword" ,db="graph.db") without is_V4=TRUE
but a lot of important method don't work as get_labels , get_relationship and I have this error :
Error in if (con$is_V4 == TRUE) { : argument is of length zero.
I have a MacBook and I tried the code in Rstudio cloud and is always a same problem
Hello, I have the same problem , any help ?
Hello @ahxxad I edited the package and its work for me install this from here https://github.com/medseddik1999/neo4rmyedition
`{r} install_github("midouseddik67200/neo4rmyedition")
con <- neo4j_api$new(url = "host", user = "neo4j", password = "pssword" ,db="graph.db", is_V4=TRUE)
con$ping()
`
The is_V4=TRUE is not needed, this was removed a long time ago.
Please use my master not the 4.x
con1 <- neo4j_api$new(
con1$ping() [1] TRUE
con1$get_constraints() No data returned. con1$get_version() [1] "Found Neo4j 4.x" [1] TRUE
On Nov 2, 2022, at 4:57 AM, Midou Seddik @.***> wrote:
Hello @ahxxad https://github.com/ahxxad I edited the package and its work for me install this from here https://github.com/medseddik1999/neo4rmyedition https://github.com/medseddik1999/neo4rmyedition `{r} install_github("midouseddik67200/neo4rmyedition")
con <- neo4j_api$new(url = "host", user = "neo4j", password = "pssword" ,db="graph.db", is_V4=TRUE)
con$ping()
`
— Reply to this email directly, view it on GitHub https://github.com/neo4j-rstats/neo4r/issues/94#issuecomment-1299879081, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFBXAGH76DV6IH6BFYWH2GTWGIUGRANCNFSM5QC3DS2A. You are receiving this because you are subscribed to this thread.
@davidlrosenblum, the problem with your current master is that it no longer allows for the specification of the database argument ("db="), which is forcing people to use an older commit of your fork. Can you add a new version that does not require the is_V4 argument, but also allows use of the db argument?
Use my fork
"davidlrosenblum/neo4r”
Here is my session below
R version 4.2.2 (2022-10-31) -- "Innocent and Trusting" Copyright (C) 2022 The R Foundation for Statistical Computing Platform: aarch64-apple-darwin20 (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R.
[Workspace loaded from ~/.RData]
library(devtools) Loading required package: usethis install_github("davidlrosenblum/neo4r") Skipping install of 'neo4r' from a github remote, the SHA1 (4de7ea2e) has not changed since last install. Use
force = TRUE
to force installation library(neo4r)con1 <- neo4j_api$new(url = "http://localhost:7474",user="neo4j",password=“xxxxj",db="hcanalytics") [1] "Found Neo4j 4.x” con1$ping() [1] TRUE con1$get_constraints() constraint <- con1$get_constraints() constraint $name
A tibble: 7 × 1
value
1 constraint_case_primaryid 2 constraint_drug_name 3 constraint_manufacturer_name 4 constraint_outcome_code 5 constraint_reaction_description 6 constraint_reportsource_code 7 constraint_therapy_primaryid
$description
value
Hello,
i'm new to R and neo4j. I tried to follow the Doc but im stuck at this point:
Here is my code:
install.packages("Rtools") install_github("davidlrosenblum/neo4r@4.x")
library(httr) library(devtools)
loading neo4r lib
library(neo4r) packageVersion('neo4r')
con object
con40 <- neo4j_api$new(url = "http://localhost:7474", user = "neo4j", password ="mpineo", db = "neo4j", isv4 = TRUE)
testing connection
con40$ping() con40$get_version() con40$get_constraints()
-> I'm getting the following error message: Error in if (con$is_V4 == TRUE) { : argument has length 0
Im using Neo4j Community 4.4.4 (> con40$get_version() [1] "4.4.4")
My ping worked con40$ping() [1] 200
What am I missing?