UedaTakeyuki / pondslider

Versatile sensor handler that can handle different sensors in the same way.
MIT License
5 stars 1 forks source link

Error with using pondslider and mh_z19 #1

Closed HeikoGH closed 2 years ago

HeikoGH commented 2 years ago

Hello there, thank you for providing the modules for the MH-Z19! Using the mh_z19 python module works

pi@co2sensor:~/mh-z19 $ sudo python -m mh_z19 --all
{"co2": 1845, "temperature": 19, "TT": 59, "SS": 0, "UhUl": 1024}
pi@co2sensor:~/mh-z19 $

But I have problems using the pondslider module to publish the measurements.

I am running Raspian Buster (11) on a Raspberry Pi 3b. When I try to call the pondslider module, I get this error

pi@co2sensor:~/mh-z19 $ sudo python -m pondslider --sensor_handlers mh_z19 
Traceback (most recent call last):
  File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.9/dist-packages/pondslider/__main__.py", line 68, in <module>
    pondslider.read(args.config)
AttributeError: module '__init__' has no attribute 'read'
pi@co2sensor:~/mh-z19 $ 

Do you have an idea what's going wrong? Thank you in advance!

UedaTakeyuki commented 2 years ago

Hi HeikoGH!

Thank you for your using pondslider and report me the issue.

I'm afraid that I have no idea. Actually, module init definitely has function read

FabianRueckert commented 2 years ago

I have the same issue.

UedaTakeyuki commented 2 years ago

Sorry, but I have no idea. How about moving this topic to discussion and waiting for someone who has an idea.

UedaTakeyuki commented 2 years ago

I can reproduce this issue with bullseye, and fix it in the latest version.