-
Notifications
You must be signed in to change notification settings - Fork 522
Pandas 0.24.0 TypeError TzInfo #676
Comments
I got the same in the following environment:
Here is what influx client returns:
And when I try to do the same query using influxdb python module, my attempt ends up with following exception:
TypeError: Already tz-aware, use tz_convert to convert. I have fixed the problem locally by replacement invocation of |
I've upgraded my package and fell on the same problem. |
Hi guys, hitting the same issue. Any ideas when this fix might make it into a release? thanks :) |
Got it too. When also I have a problem when using InfluxDBClient and casting the points from the result set to a pandas DataFrame where some columns get duplicated (it happens only if a lot of data is fetched). |
Here's patch for lazy ones, who need this urgently. It can be easily applied using |
I checked tz_localize() in pandas, following is sample codes and works on pandas version 0.23.4.
I was worried about this. |
@tech-inventory I have never used panda nor DataFrameClient, do you think #679 solves the problem? influxdb-python/influxdb/_dataframe_client.py Lines 204 to 207 in 5da62e9
Would it be better to add |
thanks for reply,
|
Just to confirm, also running into this problem on a new box with a fresh install |
Update all except pandas, which we pin at <0.24 since influxdb client library at the moment is incompatible with pandas 0.24 influxdata/influxdb-python#676
|
Hello, I've been dealing with this issue for some time and I didn't want to change an external dist-package. Since I was trying to figure a way out to "convert tz", I assisgned an epoch value as parameter rather than leaving it "None" by default. rs = client.query(iquery, epoch="ns") Maybe you can try something like this. |
Should be solved in 5.2.2 |
So upgrade influxdb lib 5.2.1 to 5.2.2
I just upgraded from
pandas 0.23.4
topandas 0.24.0
.With
pandas 0.24.0
andinfluxdb 5.2.1
:leads to
TypeError: Already tz-aware, use tz_convert to convert.
The same query directly on the database returns:
Note that it works great with
pandas 0.23.4
for me despite #671The text was updated successfully, but these errors were encountered: