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

Error in overscope_eval_next(overscope, expr) : object 'statement_id' not found #32

Closed
martinriemer opened this issue Oct 17, 2017 · 5 comments

Comments

@martinriemer
Copy link

Unable to influxdbr::show_databases() => Error in overscope_eval_next(overscope, expr) :
object 'statement_id' not found.

create_database works!

X-Influxdb-Version: 1.0.2

debuging so far:
response <- httr::GET(url="",scheme=con$scheme,hostname=con$host,port=con$port,path=paste0(con$path, "query"),query="SHOW DATABASES")

jsonlite::fromJSON(rawToChar(response$content))
Error: parse error: trailing garbage
400 Bad Request
(right here) ------^

same issue for show_measurements

I would love to use the package!
Thanx,
Martin

@dleutnant
Copy link
Owner

Did you try (especially the list(q = ...))

httr::GET(url="",scheme=con$scheme,hostname=con$host,port=con$port,path=paste0(con$path, "query"),query= list(q = "SHOW DATABASES"))                                                                                           

Otherwise: How about sessionInfo()?

@martinriemer
Copy link
Author

wow, that was quick!

with the list(q=...) it works !?

but your function (show_databases) still make problems.

library(influxdbr)

con <- influxdbr::influx_connection(group = "admin", verbose = TRUE,config_file = "influxdb.cnf")
[1] "http://192.168.1.110:8086/ping"
Success: (204) No Content

httr::GET(url="",scheme=con$scheme,hostname=con$host,port=con$port,path=paste0(con$path, "query"),query= list(q = "SHOW DATABASES"))
Response [http://192.168.1.110:8086/query?q=SHOW%20DATABASES]
Date: 2017-10-17 10:25
Status: 200
Content-Type: application/json
Size: 113 B
{"results":[{"series":[{"name":"databases","columns":["name"],"values":[["_internal"],["mystuff"],["mydb"]]}]}]}

influxdbr::show_databases(con = con)
Error in overscope_eval_next(overscope, expr) :
object 'statement_id' not found

sessionInfo()
R version 3.4.2 (2017-09-28)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: OS X El Capitan 10.11.6

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
[1] influxdbr_0.13.0.9000

loaded via a namespace (and not attached):
[1] httr_1.3.1 compiler_3.4.2 R6_2.2.2 magrittr_1.5 tools_3.4.2 tibble_1.3.4 curl_3.0 Rcpp_0.12.13
[9] jsonlite_1.5 rlang_0.1.2 purrr_0.2.3

@dleutnant
Copy link
Owner

I think influxdata/influxdb#7368 explains the error. Since InfluxDB V1.2 the json
response contains a "statement_id" to handle partial response with chunking.

Compare the following:

{"results":[{"series":[{"name":"databases", ...

to

{"results":[{"statement_id":0,"series":[{"name":"databases", ...

Any chance to update your InfluxDB?

@dleutnant
Copy link
Owner

dleutnant commented Oct 17, 2017

Issue should be solved in 36e9c98.
Could you please update to latest dev version and confirm?

@martinriemer
Copy link
Author

Works fine after upgrade to influxdb 1.3.6
Thanks for your help!!!

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

2 participants