ZoneMinder / zmeventnotification

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

zm_train_Faces.py fails #308

Closed c00ntact closed 3 years ago

c00ntact commented 4 years ago

Event Server version

ES 6.0.0

Hooks version

(If your question is about the machine learning looks) You can get the version by doing:

python3 -c "import pyzm; print (pyzm.ml.__version__)"

The version of ZoneMinder you are using:

1.34.21

What is the nature of your issue code error

Details

zm_train_faces.py does not execute

Debug Logs (if applicable)

$: sudo -u www-data /var/lib/zmeventnotification/bin/zm_train_faces.py
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/zmes_hook_helpers/utils.py", line 359, in process_config
    g.logger.Info(
  File "/usr/local/lib/python3.8/dist-packages/pyzm/ZMLog.py", line 332, in Info
    _log('INF',message,caller)
  File "/usr/local/lib/python3.8/dist-packages/pyzm/ZMLog.py", line 322, in _log
    print (log_string)
UnboundLocalError: local variable 'log_string' referenced before assignment

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/var/lib/zmeventnotification/bin/zm_train_faces.py", line 27, in <module>
    utils.process_config(args, g.ctx)
  File "/usr/local/lib/python3.8/dist-packages/zmes_hook_helpers/utils.py", line 363, in process_config
    g.logger.Error('Error parsing config:{}'.format(args.get('config')))
  File "/usr/local/lib/python3.8/dist-packages/pyzm/ZMLog.py", line 373, in Error
    _log('ERR',message,caller)
  File "/usr/local/lib/python3.8/dist-packages/pyzm/ZMLog.py", line 322, in _log
    print (log_string)
UnboundLocalError: local variable 'log_string' referenced before assignment

Thanks!

pliablepixels commented 4 years ago

Could you update to 6.0.1? I don't see it

c00ntact commented 4 years ago

Just upgraded to 6.0.1 and I am still seeing the same error message. Thank you

pliablepixels commented 4 years ago

It looks like there is a parsing error in your config file. Please check for duplicate entries or other errors.

pliablepixels commented 4 years ago

There was also an error in pyzm --> please update it to 0.1.30. However, I am not sure if that will fix it for you. Using the old version, I am able to invoke train faces from my command line, so it is likely there is something in your config file (objectconfig.ini) that is triggering this condition.

c00ntact commented 3 years ago

Issue has been resolved with objectconfig 1.1 and zmes-hook-helpers-6.0.6. Thank you

c00ntact commented 3 years ago

Correction, it is resolved when using hog in the objectconfig (hook/object.ini) file but still occurs if I use cnn (face_train_model=cnn)

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.