Skip to content

Authentication works on mlapi server but no detection #55

@mcs1998

Description

@mcs1998

Hi,
I was hoping someone could help me. I just installed mlapi on an external server to my Zoneminder installation with a running zmeventserver to reduce the load on the zmeventserver. The zmeventserver works fine, but I cannot access the mlapi server. While I can connect to the zmeventserver and the mlapi starts, if I use:
sudo -u www-data /var/lib/zmeventnotification/bin/zm_event_start.sh 510903
I get an empty response when I use:
ml_fallback_local=no
otherwise the normal response form the local detection.
Also, nothing is logged on the mlapi server.

When I test with cli access I can obtain a token but if I use the picture with:
curl -H "Content-Type:application/json" -H "Authorization: Bearer ${ACCESS_TOKEN}" -XPOST -d "{\"url\":\"https://upload.wikimedia.org/wikipedia/commons/c/c4/Anna%27s_hummingbird.jpg\"}" http://localhost:5000/api/v1/detect/object

I received back:

{"msg": "filetype .html not allowed"}

in the mlapi server I get back:

(trapped) error reading bcrypt version
Traceback (most recent call last):
  File "~/zm/venv/lib/python3.11/site-packages/passlib/handlers/bcrypt.py", line 620, in _load_backend_mixin
    version = _bcrypt.__about__.__version__
              ^^^^^^^^^^^^^^^^^
AttributeError: module 'bcrypt' has no attribute '__about__'
Apr 22 2025 00:19:08.974296 [DBG 1] Hashes are correct: password matched
Apr 22 2025 00:19:53.836311 [DBG 1] Monitor ID not specified, or not found in mlapi config, using zm_detect overrides
Apr 22 2025 00:19:53.836494 [DBG 2] using ml_sequence
Apr 22 2025 00:19:53.841042 [DBG 2] Found stream_sequence in mlapi config, ignoring objectconfig.ini
Apr 22 2025 00:19:53.841232 [DBG 1] Object Recognition requested
Apr 22 2025 00:19:53.841274 [DBG 1] Stream info not found, looking at args...
Apr 22 2025 00:19:53.841440 [DBG 1] Got url:https://upload.wikimedia.org/wikipedia/commons/c/c4/Anna%27s_hummingbird.jpg
Apr 22 2025 00:19:54.225892 [DBG 1] extension .html derived from text/html; charset=utf-8

Similar with the other curl examples.

mlapi version:2.2.24, pyzm version:0.3.64

Any help would be greatly appreciated.

Cheers
mcs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions