python-onvif-zeep
python-onvif-zeep copied to clipboard
Examples do not work
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?
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 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
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 ?
@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 ?
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"
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.