This repository was archived by the owner on Oct 29, 2024. It is now read-only.
This repository was archived by the owner on Oct 29, 2024. It is now read-only.
Closed
Description
Worked with influxdb-python v4.1.1
Fails with influxdb-python v5.0.0
import influxdb
client = influxdb.DataFrameClient(host='localhost', port=18086)
client.query("select * from foo", database="test")
InfluxDBClientError Traceback (most recent call last)
<ipython-input-11-85af990ed2e6> in <module>()
2
3 client = influxdb.DataFrameClient(host='localhost', port=18086)
----> 4 client.query("select * from foo", database="test")
~/.local/python/lib/python3.6/site-packages/influxdb/_dataframe_client.py in query(self, query, params, epoch, expected_response_code, database, raise_errors, chunked, chunk_size, dropna)
176 chunked=chunked,
177 chunk_size=chunk_size)
--> 178 results = super(DataFrameClient, self).query(query, **query_args)
179 if query.strip().upper().startswith("SELECT"):
180 if len(results) > 0:
~/.local/python/lib/python3.6/site-packages/influxdb/client.py in query(self, query, params, epoch, expected_response_code, database, raise_errors, chunked, chunk_size)
403 ResultSet(result, raise_errors=raise_errors)
404 for result
--> 405 in data.get('results', [])
406 ]
407
~/.local/python/lib/python3.6/site-packages/influxdb/client.py in <listcomp>(.0)
402 results = [
403 ResultSet(result, raise_errors=raise_errors)
--> 404 for result
405 in data.get('results', [])
406 ]
~/.local/python/lib/python3.6/site-packages/influxdb/resultset.py in __init__(self, series, raise_errors)
23
24 if self.error is not None and raise_errors is True:
---> 25 raise InfluxDBClientError(self.error)
26
27 @property
InfluxDBClientError: database name required
Metadata
Metadata
Assignees
Labels
No labels