Skip to content

TypeError: cb() missing 1 required positional argument: 'visualizer' #479

Open

Description

@jabberjabberjabber

In https://github.com/luxonis/depthai-experiments/blob/master/gen2-emotion-recognition/main.py

Traceback (most recent call last):
  File "C:\Users\User\depthai\emotion.py", line 5, in <module>
    from depthai_sdk.classes import TwoStagePacket, Detections, ImgDetection, DetectionPacket, TextPosition
ImportError: cannot import name 'TextPosition' from 'depthai_sdk.classes' (C:\Users\User\AppData\Roaming\Python\Python311\site-packages\depthai_sdk\classes\__init__.py)
(depthai) PS C:\Users\User\depthai> python emotion.py
Downloading C:\Users\User\.cache\blobconverter\face-detection-retail-0004_openvino_2021.4_6shave.blob...
[==================================================]
Done
Downloading C:\Users\User\.cache\blobconverter\age-gender-recognition-retail-0013_openvino_2021.4_6shave.blob...
[==================================================]
Done
Closing OAK camera
Traceback (most recent call last):
  File "C:\Users\User\depthai\emotion.py", line 39, in <module>
    oak.start(blocking=True)  # This call will block until the app is stopped (by pressing 'Q' button)
    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\User\AppData\Roaming\Python\Python311\site-packages\depthai_sdk\oak_camera.py", line 305, in start
    self.poll()
  File "C:\Users\User\AppData\Roaming\Python\Python311\site-packages\depthai_sdk\oak_camera.py", line 331, in poll
    self._oak.check_sync()
  File "C:\Users\User\AppData\Roaming\Python\Python311\site-packages\depthai_sdk\oak_device.py", line 43, in check_sync
    sync.check_queue(block=False)  # Don't block!
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\User\AppData\Roaming\Python\Python311\site-packages\depthai_sdk\oak_outputs\xout\xout_base.py", line 94, in check_queue
    self.visualize(packet)
  File "C:\Users\User\AppData\Roaming\Python\Python311\site-packages\depthai_sdk\oak_outputs\xout\xout_frames.py", line 67, in visualize
    self.callback(packet)
TypeError: cb() missing 1 required positional argument: 'visualizer'

{
    "architecture": "64bit WindowsPE",
    "machine": "AMD64",
    "platform": "Windows-10-10.0.19045-SP0",
    "processor": "Intel64 Family 6 Model 151 Stepping 5, GenuineIntel",
    "python_build": "main Apr 19 2023 23:46:34",
    "python_compiler": "MSC v.1916 64 bit (AMD64)",
    "python_implementation": "CPython",
    "python_version": "3.11.3",
    "release": "10",
    "system": "Windows",
    "version": "10.0.19045",
    "win32_ver": "10 10.0.19045 SP0 Multiprocessor Free",
    "packages": [
        "blobconverter==1.3.0",
        "boto3==1.26.126",
        "botocore==1.29.126",
        "certifi==2022.12.7",
        "charset-normalizer==2.0.12",
        "depthai==2.21.2.0",
        "depthai-sdk==1.9.5",
        "distinctipy==1.2.2",
        "ffmpy3==0.2.4",
        "idna==3.4",
        "jmespath==1.0.1",
        "lz4==4.3.2",
        "marshmallow==3.17.0",
        "mcap==1.0.2",
        "mcap-ros1-support==0.0.8",
        "numpy==1.24.3",
        "opencv-contrib-python==4.5.5.62",
        "packaging==23.1",
        "pip==23.1.1",
        "PyQt5==5.15.5",
        "PyQt5-Qt5==5.15.2",
        "PyQt5-sip==12.12.1",
        "python-dateutil==2.8.2",
        "pytube==12.1.3",
        "PyTurboJPEG==1.6.4",
        "pyusb==1.2.1",
        "PyYAML==6.0",
        "Qt.py==1.3.8",
        "requests==2.26.0",
        "rosbags==0.9.11",
        "ruamel.yaml==0.17.21",
        "s3transfer==0.6.0",
        "scipy==1.10.1",
        "sentry-sdk==1.5.1",
        "setuptools==66.0.0",
        "six==1.16.0",
        "types-PySide2==5.15.2.1.5",
        "urllib3==1.26.15",
        "wheel==0.38.4",
        "xmltodict==0.13.0",
        "zstandard==0.21.0"
    ],

 ]
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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