Skip to content

timeseries2csv.py Version 0.0.6 brings a ValueError #52

Description

@leonardo0014

Hello

I think your solution is great, but there seems to be a bug in your new timeseries2csv.py version from January.
Maybe you have an idea what I'm doing wrong here, or whether the script could use some fine-tuning.

I get the following error when I try to read the day, month, or year:

Requesting ea
timestamp: 2026-07-02 23:59:59+00:00
Timeout, retrying
Incomplete frame, retrying
timestamp: 2026-07-02 23:59:59+00:00
Traceback (most recent call last):
File "/rctclient/bin/timeseries2csv.py", line 346, in <module>
timeseries2csv()
~~~~~~~~~~~~~~^^
File "/rctclient/lib/python3.13/site-packages/click/core.py", line 1569, in __call__
return self.main(*args, **kwargs)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/rctclient/lib/python3.13/site-packages/click/core.py", line 1490, in main
rv = self.invoke(ctx)
File "/rctclient/lib/python3.13/site-packages/click/core.py", line 1353, in invoke
return ctx.invoke(self.callback, **ctx.params)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/rctclient/lib/python3.13/site-packages/click/core.py", line 907, in invoke
return callback(*args, **kwargs)
File "/rctclient/bin/timeseries2csv.py", line 295, in timeseries2csv
nt_ts = t_ts.replace(hour=t_ts.hour + 1)
ValueError: hour must be in 0..23

The error is understandable, because 23 + 1 is 24, and that is outside the 0–23 range.
I call the script as follows:

timeseries2csv.py --host=192.168.1.9 --resolution=month --count=1 0

The error also occurs when I set the time zone.

timeseries2csv.py --host=192.168.1.9 --resolution=month --count=1 --time-zone=utc 0

Attached are a few more values ​​that I captured and extracted using read_pcap.py.
isse20260720.txt

my Python 3.13.5 virtual environment

pip list
Package                       Version
----------------------------- -----------
alabaster                     1.0.0
babel                         2.18.0
certifi                       2026.6.17
charset-normalizer            3.4.9
click                         8.4.2
docutils                      0.22.4
idna                          3.18
imagesize                     2.0.0
influxdb                      5.3.2
Jinja2                        3.1.6
MarkupSafe                    3.0.3
msgpack                       1.2.1
packaging                     26.2
pip                           26.1.2
Pygments                      2.20.0
python-dateutil               2.9.0.post0
pytz                          2026.2
rctclient                     0.0.6
requests                      2.34.2
roman-numerals                4.1.0
scapy                         2.7.0
setuptools                    83.0.0
six                           1.17.0
snowballstemmer               3.1.1
Sphinx                        9.1.0
sphinx-autodoc-typehints      3.12.1
sphinx-click                  6.2.0
sphinx_rtd_theme              3.1.0
sphinxcontrib-applehelp       2.0.0
sphinxcontrib-devhelp         2.0.0
sphinxcontrib-htmlhelp        2.1.0
sphinxcontrib-jquery          4.1
sphinxcontrib-jsmath          1.0.1
sphinxcontrib-qthelp          2.0.0
sphinxcontrib-serializinghtml 2.0.0
urllib3                       2.7.0

Maybe you'll have the time and inclination at some point to take a look at the error and evaluate it.
I would like to thank you in advance for any assistance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions