python-onvif-zeep icon indicating copy to clipboard operation
python-onvif-zeep copied to clipboard

Examples do not work

Open slowmathematician opened this issue 6 years ago • 6 comments

I installed the latest version of the python-onvif-zeep, but examples from repository do not work. I am faced with the following problem:

Traceback (most recent call last): File "examples/continuous_move.py", line 85, in <module> continuous_move() File "examples/continuous_move.py", line 56, in continuous_move request.ConfigurationToken = media_profile.PTZConfiguration._token File "/usr/lib/python2.7/site-packages/zeep-2.5.0-py2.7.egg/zeep/xsd/valueobjects.py", line 142, in __getattribute__ self.__class__.__name__, key)) AttributeError: PTZConfiguration instance has no attribute '_token'

Similarly for Python3.4:

Traceback (most recent call last): File "examples/continuous_move.py", line 85, in <module> continuous_move() File "examples/continuous_move.py", line 56, in continuous_move request.ConfigurationToken = media_profile.PTZConfiguration._token File "/usr/lib/python3.4/site-packages/zeep-2.5.0-py3.4.egg/zeep/xsd/valueobjects.py", line 142, in __getattribute__ self.__class__.__name__, key)) AttributeError: PTZConfiguration instance has no attribute '_token'

In this regard, I have to correct the relevant places in the code: Object._token --> Object.token, to eliminate these errors. Please, tell me where does this bug come from?

slowmathematician avatar Apr 13 '18 16:04 slowmathematician

I got over the _token deal changing it to just token, but I have an error with the request that says the attribute is None. Have you encountered the same error??

jmiguel99 avatar Oct 11 '18 17:10 jmiguel99

@jmiguel99 I have encountered the same problem. Do you know how to solve this problem?

Traceback (most recent call last): File "streaming.py", line 67, in media_profile_configuration() File "streaming.py", line 55, in media_profile_configuration options.Extension.H264[0].BitrateRange[0].Min[0] TypeError: 'NoneType' object is not subscriptable

THHHomas avatar Mar 22 '19 01:03 THHHomas

I got over the _token deal changing it to just token, but I have an error with the request that says the attribute is None. Have you encountered the same error??

I got stuck at the same point - did you find a solution, @THHHomas ?

alemamm avatar Apr 16 '19 12:04 alemamm

@jmiguel99 I have encountered the same problem. Do you know how to solve this problem?

Traceback (most recent call last): File "streaming.py", line 67, in media_profile_configuration() File "streaming.py", line 55, in media_profile_configuration options.Extension.H264[0].BitrateRange[0].Min[0] TypeError: 'NoneType' object is not subscriptable

I got stuck at the same point - did you find a solution, @slowmathematician ?

hua1024 avatar Jun 06 '19 09:06 hua1024

The "Extension" attribute for options for my camera was virtually empty, all the values for extension under options were "None". Not sure how to fix the extension values, but hard coding "video_encoder_configuration.RateControl.BitrateLimit" to equal a int will allow this example to work. Mine is personally set to "video_encoder_configuration.RateControl.BitrateLimit = 6144"

bonsaibobob avatar Jul 12 '21 20:07 bonsaibobob

Any update in this issue? changing "video_encoder_configuration.RateControl.BitrateLimit = 6144" like @bonsaibobob did allowed me to run the streaming.py, but nothing happens. I want to get the video stream of the camera.

EduardoRonchi avatar Sep 22 '21 18:09 EduardoRonchi