stereolabs / zed-python-api

Python API for the ZED SDK
https://www.stereolabs.com/docs/app-development/python/install/
MIT License
209 stars 95 forks source link

get_recording_status() method not available (Looks like error in module code) #146

Closed chikko80 closed 2 years ago

chikko80 commented 4 years ago

Hello,

i am facing the problem that i cant access the _get_recordingstatus() method of the Camera Object. Using latest ZED SDK and python module.

Iam not sure if the object is initiated with the camera object, didnt find anything in documentation about that, but it looks like this to me, especially because there is the _get_recordingstatus()-method according to the Camera Object.

Please check this, looks like a error in module code.

Little snippet to reproduce:

import pyzed.sl as sl

cam = sl.Camera()
init = sl.InitParameters()
init.camera_resolution = sl.RESOLUTION.HD720
status = cam.open(init)

if status != sl.ERROR_CODE.SUCCESS:
    print(repr(status))
    exit(1)

runtime = sl.RuntimeParameters()
recording_param = sl.RecordingParameters("./file.svo", sl.SVO_COMPRESSION_MODE.H265)

cam.enable_recording(recording_param)

print(cam.get_recording_status())

cam.close()

The traceback also says there is a attr error in the module code:

Traceback (most recent call last):
  File "c:/Users/Razor/zed/vsCodeProjects/ss20_rooftop_scout/Controlling/client_server/test.py", line 22, in <module>
    print(cam.get_recording_status())
  File "pyzed\sl.pyx", line 6584, in pyzed.sl.Camera.get_recording_status
AttributeError: 'pyzed.sl.RecordingStatus' object has no attribute 'recordingStatus'
RomanBats commented 4 years ago

@chikko80, please take a look if enable_recording is successful:

err = cam.enable_recording(recording_param)
     if (err != sl.ERROR_CODE.SUCCESS) :
         print(repr(err))
github-actions[bot] commented 2 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment otherwise it will be automatically closed in 5 days