Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is_V4 == true Argument length = 0 #94

Open
Ritzzu opened this issue Mar 7, 2022 · 7 comments
Open

is_V4 == true Argument length = 0 #94

Ritzzu opened this issue Mar 7, 2022 · 7 comments

Comments

@Ritzzu
Copy link

Ritzzu commented Mar 7, 2022

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?

@billmclellan
Copy link

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

@medseddik1999
Copy link

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

@ahxxad
Copy link

ahxxad commented Nov 1, 2022

Hello, I have the same problem , any help ?

@medseddik1999
Copy link

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()

`

@davidlrosenblum
Copy link

davidlrosenblum commented Nov 2, 2022 via email

@docreeg
Copy link

docreeg commented Nov 11, 2022

@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?

@davidlrosenblum
Copy link

davidlrosenblum commented Nov 11, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants