viseron icon indicating copy to clipboard operation
viseron copied to clipboard

Error in face expiration logic

Open pilartomas opened this issue 2 years ago • 1 comments

Good evening, I am consistently experiencing the following error upon face expiration.

Traceback (most recent call last): File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "/usr/lib/python3.8/threading.py", line 1254, in run self.function(*self.args, **self.kwargs) File "/src/viseron/post_processors/face_recognition/init.py", line 136, in expire_face self._mqtt_devices[face].publish(False) KeyError: 'person1'

The issue seems to be that self._mqtt_devices dictionary is never populated. As a quick patch, I am using the same guard that is used in known_face_found method. That, however, doesn't seem to be the proper solution as MQTT messaging is effectively ignored.

Great project btw, keep it up!

pilartomas avatar Dec 17 '21 18:12 pilartomas

Thanks for the report! It will kind of fix it self in the next release since MQTT wont be embedded into different components any more. It will be a standalone feature which is responsible for the MQTT communication

roflcoopter avatar Dec 22 '21 10:12 roflcoopter

Closed in v2

roflcoopter avatar Dec 19 '22 14:12 roflcoopter