ZoneMinder / zmeventnotification

Machine Learning powered Secure Websocket & MQTT based ZoneMinder event notification server
412 stars 128 forks source link

zm_detect.py can't run - SyntaxError #282

Closed vanbcguy closed 4 years ago

vanbcguy commented 4 years ago

Before you create an issue, please make sure you have read the README. If you are asking about the object detection part, I don't provide support for it unless you've tried hard enough.

Event Server version

v5.15.6

Hooks version

3.2.9

The version of ZoneMinder you are using:

1.35.5

What is the nature of your issue

Bug

Details

For the past several months I haven't been able to get zm_detect to work. When trying to run the command manually, I get a SyntaxError back from g.logger:

$  /var/lib/zmeventnotification/bin/zm_detect.py
  File "/var/lib/zmeventnotification/bin/zm_detect.py", line 179
    g.logger.fatal (f'{e}: You might not have installed OpenCV as per install instructions. Remember, it is NOT automatically installed')
                                                                                                                                       ^
SyntaxError: invalid syntax

I've reinstalled, wiped my config and started over, upgraded versions of everything, etc. At first I thought this was related to OpenCV, but then I realized it's actually the logger that's complaining about the syntax of the logger message. I'm thinking that 'f' isn't getting properly populated?

This zoneminder system has been around for quite a long time so it's possible I have some cruft in my DB or something like that.

Thanks!

Bryn

pliablepixels commented 4 years ago

That usually means your python is old. Make sure you are on python 3.6 or above.

vanbcguy commented 4 years ago

Gotcha, I'm definitely on v3 / v3.5. I'll update and re-test. Thanks for the help!!! I'll close this for the time being as "likely solved"