ZM_DETECT.PY unexpected keyword argument 'global_config'
wallacebw opened this issue · 4 comments
Event Server version
6.1.17
Hooks version (if you are using Object Detection)
app:6.1.17, pyzm:0.3.40
Are you using MLAPI? (Y/N)
NO
The version of ZoneMinder you are using:
ZoneMinder, v1.34.23.
What is the nature of your issue
Bug
Details
ZM_DETECT.PY
When attempting to run zm_detect.py with the following command:
sudo -u http /var/lib/zmeventnotification/bin/zm_detect.py --config /etc/zm/objectconfig.ini --debug --eventid 23140 --monitorid 6
I receive an error:unexpected keyword argument 'global_config'
Debug Logs (if applicable)
INF [zmesdetect_m6] [Setting up signal handler for logs]
INF [zmesdetect_m6] [---------| app:6.1.17, pyzm:0.3.40, ES:6.1.17 , OpenCV:4.5.1|------------]
DBG1 [zmesdetect_m6] [secret filename: /etc/zm/secrets.ini]
DBG2 [zmesdetect_m6] [Secret token found in config: !ZM_PORTAL]
DBG2 [zmesdetect_m6] [Secret token found in config: !ZM_USER]
DBG2 [zmesdetect_m6] [Secret token found in config: !ZM_PASSWORD]
DBG2 [zmesdetect_m6] [Secret token found in config: !ZM_API_PORTAL]
DBG2 [zmesdetect_m6] [Secret token found in config: !ML_USER]
DBG2 [zmesdetect_m6] [Secret token found in config: !ML_PASSWORD]
DBG2 [zmesdetect_m6] [Secret token found in config: !PLATEREC_ALPR_KEY]
DBG1 [zmesdetect_m6] [allowing self-signed certs to work...]
DBG4 [zmesdetect_m6] [Now checking for monitor overrides]
DBG4 [zmesdetect_m6] [Finally, doing parameter substitution]
INF [zmesdetect_m6] [Importing local classes for Object/Face]
INF [zmesdetect_m6] [Connecting with ZM APIs]
DBG2 [zmesdetect_m6] [API SSL certificate check has been disbled]
DBG1 [zmesdetect_m6] [using username/password for login]
DBG2 [zmesdetect_m6] [Using new token API]
DBG1 [zmesdetect_m6] [Access token expires on:2021-03-30 09:24:38.181677 [43200s]]
DBG1 [zmesdetect_m6] [Refresh token expires on:2021-03-30 21:24:38.181977 [86400s]]
DBG3 [zmesdetect_m6] [No need to relogin as access token still has 719.9999900666667 minutes remaining]
DBG4 [zmesdetect_m6] [make_request called with url=https://surveillance.domain.com/api/host/gettimezone.json payload={} type=get query={'token': 'REDACTED '}]
DBG2 [zmesdetect_m6] [using ml_sequence]
DBG2 [zmesdetect_m6] [using stream_sequence]
03/29/21 21:24:38 zmesdetect_m6[86993] FAT zm_detect.py:544 [Unrecoverable error:__init__() got an unexpected keyword argument 'global_config' Traceback:Traceback (most recent call last):
File "/var/lib/zmeventnotification/bin/zm_detect.py", line 539, in <module>
main_handler()
File "/var/lib/zmeventnotification/bin/zm_detect.py", line 409, in main_handler
m = DetectSequence(options=ml_options, global_config=g.config)
TypeError: __init__() got an unexpected keyword argument 'global_config'
]
Thanks!
How did you update? Your pyzm is not updated.
arch AUR package:
https://aur.archlinux.org/packages/zmeventnotification
Do I need to run something post update?
I reinstalled forcing a clean build: still on pyzm:0.3.40
Found the issue, I think:
ip3 install pyzm --upgrade
Requirement already satisfied: pyzm in /usr/lib/python3.9/site-packages (0.3.40)
Collecting pyzm
Downloading pyzm-0.3.41.tar.gz (53 kB)
|████████████████████████████████| 53 kB 340 kB/s
Requirement already satisfied: SQLAlchemy<1.4.0,>=1.3.20 in /usr/lib/python3.9/site-packages (from pyzm) (1.3.23)
Requirement already satisfied: mysql-connector-python>=8.0.16 in /usr/lib/python3.9/site-packages (from pyzm) (8.0.22)
Requirement already satisfied: requests>=2.18.4 in /usr/lib/python3.9/site-packages (from pyzm) (2.25.1)
Requirement already satisfied: dateparser>=1.0.0 in /usr/lib/python3.9/site-packages (from pyzm) (1.0.0)
Requirement already satisfied: websocket-client>=0.57.0 in /usr/lib/python3.9/site-packages (from pyzm) (0.58.0)
Requirement already satisfied: progressbar2>=3.53.1 in /usr/lib/python3.9/site-packages (from pyzm) (3.53.1)
Requirement already satisfied: portalocker>=2.0.0 in /usr/lib/python3.9/site-packages (from pyzm) (2.3.0)
Requirement already satisfied: Shapely>=1.7.0 in /usr/lib/python3.9/site-packages (from pyzm) (1.7.1)
Requirement already satisfied: numpy>=1.13.3 in /usr/lib/python3.9/site-packages (from pyzm) (1.20.1)
Requirement already satisfied: Pillow in /usr/lib/python3.9/site-packages (from pyzm) (8.1.2)
Requirement already satisfied: psutil>=5.7.3 in /usr/lib/python3.9/site-packages (from pyzm) (5.8.0)
Requirement already satisfied: pytz in /usr/lib/python3.9/site-packages (from dateparser>=1.0.0->pyzm) (2021.1)
Requirement already satisfied: regex!=2019.02.19 in /usr/lib/python3.9/site-packages (from dateparser>=1.0.0->pyzm) (2021.3.17)
Requirement already satisfied: python-dateutil in /usr/lib/python3.9/site-packages (from dateparser>=1.0.0->pyzm) (2.8.1)
Requirement already satisfied: tzlocal in /usr/lib/python3.9/site-packages (from dateparser>=1.0.0->pyzm) (2.1)
Collecting imutils>=0.5.3
Using cached imutils-0.5.4.tar.gz (17 kB)
Requirement already satisfied: protobuf>=3.0.0 in /usr/lib/python3.9/site-packages (from mysql-connector-python>=8.0.16->pyzm) (3.15.6)
Requirement already satisfied: python-utils>=2.3.0 in /usr/lib/python3.9/site-packages (from progressbar2>=3.53.1->pyzm) (2.5.6)
Requirement already satisfied: six in /usr/lib/python3.9/site-packages (from progressbar2>=3.53.1->pyzm) (1.15.0)
Requirement already satisfied: six in /usr/lib/python3.9/site-packages (from progressbar2>=3.53.1->pyzm) (1.15.0)
Requirement already satisfied: six in /usr/lib/python3.9/site-packages (from progressbar2>=3.53.1->pyzm) (1.15.0)
Requirement already satisfied: six in /usr/lib/python3.9/site-packages (from progressbar2>=3.53.1->pyzm) (1.15.0)
Requirement already satisfied: chardet>=3.0.2 in /usr/lib/python3.9/site-packages (from requests>=2.18.4->pyzm) (3.0.4)
Requirement already satisfied: idna>=2.5 in /usr/lib/python3.9/site-packages (from requests>=2.18.4->pyzm) (2.10)
Requirement already satisfied: urllib3>=1.21.1 in /usr/lib/python3.9/site-packages (from requests>=2.18.4->pyzm) (1.26.3)
Requirement already satisfied: pytz in /usr/lib/python3.9/site-packages (from dateparser>=1.0.0->pyzm) (2021.1)
Requirement already satisfied: six in /usr/lib/python3.9/site-packages (from progressbar2>=3.53.1->pyzm) (1.15.0)
Using legacy 'setup.py install' for pyzm, since package 'wheel' is not installed.
Using legacy 'setup.py install' for imutils, since package 'wheel' is not installed.
Installing collected packages: imutils, pyzm
Attempting uninstall: imutils
Found existing installation: imutils 0.5.2
ERROR: Cannot uninstall 'imutils'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
Researching how to correct this.
This corrected it:
sudo -H pip install --ignore-installed -U pyzm