Mycodo icon indicating copy to clipboard operation
Mycodo copied to clipboard

problem in base_conditional.py

Open Mondgans opened this issue 2 years ago • 1 comments

https://github.com/kizniche/Mycodo/commit/fcd124783ec38490c155529e0856d4c612a9ff83#commitcomment-77069592

I upgraded to master and run in an error with my conditional controllers. It impacts all existing controllers. 2022-06-27 11:23:15,984 - INFO - mycodo.controllers.controller_conditional_2d71cdb5 - Activated in 117.2 ms 2022-06-27 11:23:26,055 - ERROR - mycodo.controllers.controller_conditional_2d71cdb5 - Exception executing Conditional Statement code Traceback (most recent call last): File "/var/mycodo-root/mycodo/controllers/controller_conditional.py", line 178, in check_conditionals self.conditional_run.conditional_code_run() File "/home/pi/Mycodo/mycodo/user_python_code/conditional_2d71cdb5-a0d2-4802-8ffb-b337d553dea6.py", line 29, in conditional_code_run measurement = self.condition("c29c7f38-c4de-447d-9d8a-681341cbdce6") File "/var/mycodo-root/mycodo/controllers/base_conditional.py", line 66, in condition if cond: UnboundLocalError: local variable 'cond' referenced before assignment

Mondgans avatar Jul 04 '22 08:07 Mondgans

Thanks for the bug report. I just committed a fix.

kizniche avatar Jul 04 '22 16:07 kizniche