unexpected keyword argument 'logger' - zm_detect.py"

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
cjd24
Posts: 14
Joined: Thu Dec 09, 2021 4:15 pm

unexpected keyword argument 'logger' - zm_detect.py"

Post by cjd24 »

Hi all.

I'm trying to set up object detection and running this test command from the documentation:

'sudo -u www-data /var/lib/zmeventnotification/bin/zm_detect.py --config /etc/zm/objectconfig.ini --eventid 3 --monitorid 1 --debug'

But get this error: unexpected keyword argument 'logger'
Any fixes for this? Been trolling the internet for hours.

Many thanks


Code: Select all

12/09/21 20:33:51 zmesdetect_m1[1117] DBG2 utils.py:125 [Changing detection_mode from all to most_models to adapt to new features]

12/09/21 20:33:51 zmesdetect_m1[1117] DBG2 zm_detect.py:312 [mapping legacy stream data from config]

12/09/21 20:33:51 zmesdetect_m1[1117] INF zm_detect.py:352 [Sleeping for 5 seconds before inferencing]

12/09/21 20:33:56 zmesdetect_m1[1117] FAT zm_detect.py:534 [Unrecoverable error:__init__() got an unexpected keyword argument 'logger' Traceback:Traceback (most recent call last):
  File "/var/lib/zmeventnotification/bin/zm_detect.py", line 531, in <module>
    main_handler()
  File "/var/lib/zmeventnotification/bin/zm_detect.py", line 378, in main_handler
    m = DetectSequence(options=ml_options, logger=g.logger)
TypeError: __init__() got an unexpected keyword argument 'logger'
]
alabamatoy
Posts: 360
Joined: Sun Jun 05, 2016 2:53 pm

Re: unexpected keyword argument 'logger' - zm_detect.py"

Post by alabamatoy »

Please post a bug report in the git https://github.com/ZoneMinder/zmeventno ... ion/issues

"logger" in ubuntu is a bash tool to write a line in syslog, see https://manpages.ubuntu.com/manpages/xe ... ger.1.html so this may be some part of your problem, dunno. I use logger all the time in bash scripting.

Also, 1.34 is pretty old. Perhaps upgrade to 1.36? Its all the way up to 1.36.12 to be released today or tomorrow....
cjd24
Posts: 14
Joined: Thu Dec 09, 2021 4:15 pm

Re: unexpected keyword argument 'logger' - zm_detect.py"

Post by cjd24 »

Thanks.

I'm trying to use a different image now
zoneminderhq/zoneminder:latest-ubuntu18.04

But getting this issue

Code: Select all

tail: cannot open '/var/log/zoneminder/zm*.log' for reading: No such file or directory
https://issueexplorer.com/issue/ZoneMin ... erfiles/77

Code: Select all

root@55b959a84707:/# tail -F /var/log/zoneminder/zm*.log
[b]tail: cannot open '/var/log/zoneminder/zm*.log' for reading: No such file or directory[/b]
tail -F /var/log/zm/*.log
^C
root@55b959a84707:/# tail -F /var/log/zm/*.log          
==> /var/log/zm/zmpkg.log <==
12/10/21 15:49:18.917355 zmpkg[478].INF [main:318] [Sanity checking States table...]
12/10/21 15:49:18.919460 zmpkg[478].INF [main:95] [Command: start]
12/10/21 15:49:20.341452 zmpkg[478].INF [main:211] [Single server configuration detected. Starting up services.]

==> /var/log/zm/zmupdate.log <==
12/10/21 15:49:21.244954 zmupdate[552].INF [main:166] [Checking for updates]
12/10/21 15:49:21.983720 zmupdate[552].INF [main:182] [Got version: 1.34.26]
root@Zoneminder:~# 
cjd24
Posts: 14
Joined: Thu Dec 09, 2021 4:15 pm

Re: unexpected keyword argument 'logger' - zm_detect.py"

Post by cjd24 »

decided to ditch the docker and run straight from the container using

https://wiki.zoneminder.com/Ubuntu_Serv ... der_1.36.x

Now need to set up all of the ES options and configs
cjd24
Posts: 14
Joined: Thu Dec 09, 2021 4:15 pm

Re: unexpected keyword argument 'logger' - zm_detect.py"

Post by cjd24 »

Just a couple of niggling issues - rest is all set up and ran an object detection test which worked.

But check config comes up with an odd json error.
Also if object detection is running where do I view the detected objects? Still a bit unclear to me.

Code: Select all

root@ZM:~/zmeventnotification# sudo /usr/bin/zmeventnotification.pl --check-config
12/10/21 15:46:30.824299 zmeventnotification[1107].FAT [main:71] [JSON or JSON::XS  missing]
cjd24
Posts: 14
Joined: Thu Dec 09, 2021 4:15 pm

Re: unexpected keyword argument 'logger' - zm_detect.py"

Post by cjd24 »

Was missing this

sudo apt-get install libjson-perl

all ok now
Post Reply