You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.
defas_utc_with_z(date):
date_str=date.astimezone(tz.UTC).isoformat()
returnf"{date_str[:-6]}Z"defparse_datetime(dt):
d=dateutil.parser.parse(dt)
ifd.tzinfoisNone:
d=d.replace(tzinfo=tz.tzlocal())
returnddefmain():
parser=argparse.ArgumentParser()
...
args=parser.parse_args(argv)
fetch_range= (parse_datetime(args.begin), parse_datetime(args.end))
...
fetch_range= [as_utc_with_z(x) forxinfetch_range]
kwargs= {
"host": credentials["host"],
"port": credentials["port"],
"username": credentials["user"],
"password": credentials["password"],
"database": credentials["db"],
"ssl": True,
"verify_ssl": True,
}
client=InfluxDBClient(**kwargs)
query=f"SELECT * FROM verzuolo WHERE time >= '{fetch_range[0]}' AND time <= '{fetch_range[1]}'"res=client.query(query)
...
When I execute my script with --begin 2021-06-03T00:00 --end 2021-06-03T23:59 then I get this error:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb0 in position 0: invalid start byte
I know that the customer started writing data at some point on the 3rd of June, if I set the date to 2nd of June I get an empty response. But when I use any other day, then I get a proper reponse.
So the problem is in the influxdb/client.py file on line 357 (request function). Passing raw=False to msgpack.unpackb yields the execption. Passing raw=True does not yield an error but in the response you don't get str-objects but byte-objects.
So the question is: where is the error? On the server side, or on the client side? And as an user of this library, is there anything I can do?
Version information
InfluxDB version: unknown, not my server
InfluxDB-python version:5.3.1
Python version:3.8.8 (output of the python --version command)
Operating system version: GNU Linux
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I initialized the client:
When I execute my script with
--begin 2021-06-03T00:00 --end 2021-06-03T23:59
then I get this error:I know that the customer started writing data at some point on the 3rd of June, if I set the date to 2nd of June I get an empty response. But when I use any other day, then I get a proper reponse.
So the problem is in the
influxdb/client.py
file on line 357 (request
function). Passingraw=False
tomsgpack.unpackb
yields the execption. Passingraw=True
does not yield an error but in the response you don't getstr
-objects butbyte
-objects.So the question is: where is the error? On the server side, or on the client side? And as an user of this library, is there anything I can do?
Version information
5.3.1
3.8.8
(output of thepython --version
command)The text was updated successfully, but these errors were encountered: