Skip to content

not compatible with python 3.11 ? #22

@Robert-Riedl

Description

@Robert-Riedl

I'm trying this on Rasbian bookworm wiht python 3.11 and getting weird errors, i.e.

#~ python3 /opt/waveplus_bridge/waveplus_bridge.py --config /opt/waveplus_bridge/waveplus_bridge.yaml 293014466
Traceback (most recent call last):
  File "/opt/waveplus_bridge/waveplus_bridge.py", line 804, in <module>
    main()
  File "/opt/waveplus_bridge/waveplus_bridge.py", line 586, in main
    config = ReadConfiguration()
             ^^^^^^^^^^^^^^^^^^^
  File "/opt/waveplus_bridge/waveplus_bridge.py", line 83, in __init__
    self.read_yaml_config_file(config['config']).items():
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'items'

even though the basic function works, but it seems to ignore the --period setting ? 2-3 seconds instead of 10 ?


~# python3 /opt/waveplus_bridge/waveplus_bridge.py --period 10 2930144663 
2024-01-26 16:39:02 -      __main__[  DEBUG] - Available logger:
2024-01-26 16:39:02 -      __main__[  DEBUG] -    <Logger libs.logdb (WARNING)>
2024-01-26 16:39:02 -      __main__[  DEBUG] -    <Logger libs (WARNING)>
2024-01-26 16:39:02 -      __main__[  DEBUG] -    <Logger libs.threadedsendmail (WARNING)>
2024-01-26 16:39:02 -      __main__[  DEBUG] -    <Logger libs.performancecheck (WARNING)>
2024-01-26 16:39:02 -      __main__[  DEBUG] -    <Logger libs.waveplus (WARNING)>
2024-01-26 16:39:02 -      __main__[  DEBUG] -    <Logger libs.threadedmqttpublisher (WARNING)>
2024-01-26 16:39:02 -      __main__[  DEBUG] -    <Logger __main__ (DEBUG)>
2024-01-26 16:39:02 -      __main__[   INFO] - Setup WavePlus device access
2024-01-26 16:39:02 -      __main__[   INFO] -   Done
2024-01-26 16:39:02 -      __main__[   INFO] - Start main loop. Press ctrl+C to exit program!
2024-01-26 16:39:02 -      __main__[  DEBUG] - Reading sensor data for device 2930144663
2024-01-26 16:39:02 - libs.waveplus[WARNING] - Failed to communicate with device                                2930144663 (attempt 1 of 4): Device disconnected
2024-01-26 16:39:08 -      __main__[  DEBUG] -   -> {'humidity': 43.0, 'radon_st': 35, 'radon_lt': 66, 'temperature': 22.23, 'pressure': 997.32, 'co2': 1185.0, 'voc': 46.0, 'illuminance': 5, 'battery': 100}
2024-01-26 16:39:12 -      __main__[  DEBUG] - Reading sensor data for device 2930144663
2024-01-26 16:39:14 -      __main__[  DEBUG] -   -> {'humidity': 43.0, 'radon_st': 35, 'radon_lt': 66, 'temperature': 22.23, 'pressure': 997.32, 'co2': 1185.0, 'voc': 46.0, 'illuminance': 5, 'battery': 100}
2024-01-26 16:39:22 -      __main__[  DEBUG] - Reading sensor data for device 2930144663
2024-01-26 16:39:24 -      __main__[  DEBUG] -   -> {'humidity': 43.0, 'radon_st': 35, 'radon_lt': 66, 'temperature': 22.23, 'pressure': 997.32, 'co2': 1185.0, 'voc': 46.0, 'illuminance': 5, 'battery': 100}
2024-01-26 16:39:32 -      __main__[  DEBUG] - Reading sensor data for device 2930144663
2024-01-26 16:39:35 -      __main__[  DEBUG] -   -> {'humidity': 43.0, 'radon_st': 35, 'radon_lt': 66, 'temperature': 22.23, 'pressure': 997.32, 'co2': 1185.0, 'voc': 46.0, 'illuminance': 5, 'battery': 100}
2024-01-26 16:39:42 -      __main__[  DEBUG] - Reading sensor data for device 2930144663
2024-01-26 16:39:45 -      __main__[  DEBUG] -   -> {'humidity': 43.0, 'radon_st': 35, 'radon_lt': 66, 'temperature': 22.23, 'pressure': 997.32, 'co2': 1185.0, 'voc': 46.0, 'illuminance': 5, 'battery': 100}
^C2024-01-26 16:39:48 -      __main__[WARNING] - Interrupt/termination request detected
2024-01-26 16:39:48 -      __main__[   INFO] - WavePlus_bridge ended

The only thing I can think of, that makes a difference - would be the python version ?

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