Skip to content

Fix fatal happening after introducing as_of_date for tests #32

Closed
@ssenart

Description

@ssenart

RROR [main] An error occured while running Gazpar2HAWS: Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/gazpar2haws/main.py", line 86, in main
bridge = Bridge(config)
^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/gazpar2haws/bridge.py", line 33, in init
self._gazpar.append(Gazpar(grdf_device_config, self._homeassistant))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/gazpar2haws/gazpar.py", line 46, in init
self._as_of_date = timezone.localize(self._as_of_date)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pytz/tzinfo.py", line 321, in localize
raise ValueError('Not naive datetime (tzinfo is already set)')
ValueError: Not naive datetime (tzinfo is already set)
Gazpar2HAWS version: 0.1.10
An error occured while running Gazpar2HAWS: Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/gazpar2haws/main.py", line 86, in main
bridge = Bridge(config)
^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/gazpar2haws/bridge.py", line 33, in init
self._gazpar.append(Gazpar(grdf_device_config, self._homeassistant))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/gazpar2haws/gazpar.py", line 46, in init
self._as_of_date = timezone.localize(self._as_of_date)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pytz/tzinfo.py", line 321, in localize
raise ValueError('Not naive datetime (tzinfo is already set)')
ValueError: Not naive datetime (tzinfo is already set)

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