Skip to content

Error GrDF send missing data with type="Absence de Données" #37

Closed
@ssenart

Description

@ssenart

With an input data like:

{'time_period': '23/07/2023', 'start_index_m3': None, 'end_index_m3': None, 'volume_m3': None, 'energy_kwh': None, 'converter_factor_kwh/m3': None, 'temperature_degC': 18.19, 'type': 'Absence de Données', 'timestamp': '2025-01-15T19:00:06.947448'}

We have the error:

2025-01-15 19:00:07,092 ERROR [__main__] An error occured while running Gazpar2HAWS: Traceback (most recent call last):
  File "/home/mrayianalex/Projets/python/venv/lib/python3.12/site-packages/gazpar2haws/__main__.py", line 87, in main
    await bridge.run()
  File "/home/mrayianalex/Projets/python/venv/lib/python3.12/site-packages/gazpar2haws/bridge.py", line 66, in run
    await gazpar.publish()
  File "/home/mrayianalex/Projets/python/venv/lib/python3.12/site-packages/gazpar2haws/gazpar.py", line 74, in publish
    await self._publish_entity(
  File "/home/mrayianalex/Projets/python/venv/lib/python3.12/site-packages/gazpar2haws/gazpar.py", line 132, in _publish_entity
    total += reading[property_name]
TypeError: unsupported operand type(s) for +=: 'float' and 'NoneType'

An error occured while running Gazpar2HAWS: Traceback (most recent call last):
  File "/home/mrayianalex/Projets/python/venv/lib/python3.12/site-packages/gazpar2haws/__main__.py", line 87, in main
    await bridge.run()
  File "/home/mrayianalex/Projets/python/venv/lib/python3.12/site-packages/gazpar2haws/bridge.py", line 66, in run
    await gazpar.publish()
  File "/home/mrayianalex/Projets/python/venv/lib/python3.12/site-packages/gazpar2haws/gazpar.py", line 74, in publish
    await self._publish_entity(
  File "/home/mrayianalex/Projets/python/venv/lib/python3.12/site-packages/gazpar2haws/gazpar.py", line 132, in _publish_entity
    total += reading[property_name]
TypeError: unsupported operand type(s) for +=: 'float' and 'NoneType'

We have to manage None values in index.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions