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

Byte limit error when executing call_neo4j #99

Open
masaver opened this issue May 4, 2023 · 0 comments
Open

Byte limit error when executing call_neo4j #99

masaver opened this issue May 4, 2023 · 0 comments

Comments

@masaver
Copy link

masaver commented May 4, 2023

I'm using neo4r to query a Neo4J database that runs via a docker container (Ref: https://ckg.readthedocs.io/en/latest/intro/getting-started-with-docker.html ).

These are the libraries I'm loading:
suppressMessages( library( tidyverse ) )
suppressMessages( library( data.table ) )
suppressMessages( library( magrittr )
suppressMessages( library( neo4r ) )

(I need tidyverse , data.table and magrittr to parse the output of call_neo4j )

The connection is set up like this :
con <- neo4j_api$new( url = 'http://localhost:7474' , user = 'neo4j' , password = 'NeO4J' )

And I execute the queries like this:
res = neo4r::call_neo4j( Q , con , type = 'graph' )

When Q = 'MATCH a=(p1:Protein)-[r:CURATED_INTERACTS_WITH]-(p2:Protein) RETURN a;' , the query works as expected . However, when I use Q = 'MATCH a=(p1:Protein)-[r:COMPILED_INTERACTS_WITH]-(p2:Protein) RETURN a;' after a few seconds I get the following error:
Error in readBin(content, character()) : R character strings are limited to 2^31-1 bytes

If I introduce a limit to that second query , like so Q = 'MATCH a=(p1:Protein)-[r:COMPILED_INTERACTS_WITH]-(p2:Protein) RETURN a LIMIT 25;', the the query works as expected.

Any idea what causes that error and how to solve it ?

Here is the output of sessionInfo():
`> sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.6 LTS

Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=de_DE.UTF-8
[4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=de_DE.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=de_DE.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=C

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

other attached packages:
[1] neo4r_0.1.1 magrittr_2.0.3 data.table_1.14.6 forcats_0.5.2 stringr_1.5.0
[6] dplyr_1.0.10 purrr_1.0.1 readr_2.1.3 tidyr_1.2.1 tibble_3.1.8
[11] ggplot2_3.4.0 tidyverse_1.3.2

loaded via a namespace (and not attached):
[1] Rcpp_1.0.9 lubridate_1.9.0 assertthat_0.2.1 digest_0.6.31 utf8_1.2.2
[6] mime_0.12 R6_2.5.1 cellranger_1.1.0 backports_1.4.1 reprex_2.0.2
[11] evaluate_0.19 httr_1.4.4 pillar_1.8.1 rlang_1.0.6 curl_5.0.0
[16] googlesheets4_1.0.1 readxl_1.4.1 rstudioapi_0.14 rmarkdown_2.19 googledrive_2.0.0
[21] munsell_0.5.0 shiny_1.7.4 broom_1.0.2 compiler_4.1.2 httpuv_1.6.8
[26] modelr_0.1.10 xfun_0.36 pkgconfig_2.0.3 htmltools_0.5.4 tidyselect_1.2.0
[31] attempt_0.3.1 fansi_1.0.3 crayon_1.5.2 tzdb_0.3.0 dbplyr_2.2.1
[36] withr_2.5.0 later_1.3.0 grid_4.1.2 jsonlite_1.8.4 xtable_1.8-4
[41] gtable_0.3.1 lifecycle_1.0.3 DBI_1.1.3 scales_1.2.1 stringi_1.7.12
[46] cli_3.6.0 fs_1.5.2 promises_1.2.0.1 xml2_1.3.3 ellipsis_0.3.2
[51] generics_0.1.3 vctrs_0.5.1 tools_4.1.2 glue_1.6.2 hms_1.1.2
[56] fastmap_1.1.0 yaml_2.3.6 timechange_0.2.0 colorspace_2.0-3 gargle_1.2.1
[61] rvest_1.0.3 knitr_1.41 haven_2.5.1`

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

1 participant