Error with GetSreamUri Function: No namespace defined for 'ter'
See original GitHub issueHello Guys I get this error when I try to run the function GetStreamUri:
File "/usr/local/lib/python3.5/dist-packages/onvif_zeep-0.2.12-py3.5.egg/onvif/client.py", line 23, in wrapped
return func(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/onvif_zeep-0.2.12-py3.5.egg/onvif/client.py", line 153, in wrapped
return call(params, callback)
File "/usr/local/lib/python3.5/dist-packages/onvif_zeep-0.2.12-py3.5.egg/onvif/client.py", line 140, in call
ret = func(**params)
File "/usr/local/lib/python3.5/dist-packages/zeep-3.1.0-py3.5.egg/zeep/proxy.py", line 42, in __call__
self._op_name, args, kwargs)
File "/usr/local/lib/python3.5/dist-packages/zeep-3.1.0-py3.5.egg/zeep/wsdl/bindings/soap.py", line 132, in send
return self.process_reply(client, operation_obj, response)
File "/usr/local/lib/python3.5/dist-packages/zeep-3.1.0-py3.5.egg/zeep/wsdl/bindings/soap.py", line 194, in process_reply
return self.process_error(doc, operation)
File "/usr/local/lib/python3.5/dist-packages/zeep-3.1.0-py3.5.egg/zeep/wsdl/bindings/soap.py", line 338, in process_error
subcode_qname = as_qname(subcode_value_element.text, subcode_value_element.nsmap, None)
File "/usr/local/lib/python3.5/dist-packages/zeep-3.1.0-py3.5.egg/zeep/utils.py", line 31, in as_qname
"No namespace defined for %r (%r)" % (prefix, value))
zeep.exceptions.XMLParseError: No namespace defined for 'ter' ('ter:InvalidArgVal')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "testcam.py", line 32, in <module>
print(media_service.GetStreamUri(obj))
File "/usr/local/lib/python3.5/dist-packages/onvif_zeep-0.2.12-py3.5.egg/onvif/client.py", line 26, in wrapped
raise ONVIFError(err)
onvif.exceptions.ONVIFError: Unknown error: No namespace defined for 'ter' ('ter:InvalidArgVal')
Here is the funtion I am running:
from onvif import ONVIFCamera, ONVIFService
mycam = ONVIFCamera('192.168.0.112', 80, 'admin', '12345')
media_service = mycam.create_media_service()
profiles = media_service.GetProfiles()
token = profiles[0].token // using attribute '_token' returns and error so I am using atribute 'token'
obj = media_service.create_type('GetStreamUri')
obj.ProfileToken = token
obj.StreamSetup = {'Stream': 'RTP-Unicast', 'Transport': {'Protocol': 'RTSP'}}
print(media_service.GetStreamUri(obj))
The error occurs on the funtion: ##obj = media_service.create_type(‘GetStreamUri’)
I have tried installing using pip3 and I have also tried installing from the github repo. I have also checkout different versions of the github repo, but all give the same error.
Any help will be appreciated, thanks, @FalkTannhaeuser @sinchb @iomihai @mpromonet @eLvErDe
Issue Analytics
- State:
- Created 5 years ago
- Comments:6
Top Results From Across the Web
Function definition not found for a function declared inside ...
The problem is that the declarations in the unnamed namespace do not declare the same functions that you later define in the global ......
Read more >Argument-dependent lookup - cppreference.com
Argument-dependent lookup, also known as ADL, or Koenig lookup, is the set of rules for looking up the unqualified function names in ...
Read more >Do not define an unnamed namespace in a header file
Unnamed namespaces are used to define a namespace that is unique to the translation unit, where the names contained within have internal linkage...
Read more >LLVM Coding Standards — LLVM 16.0.0git documentation
Treat Compiler Warnings Like Errors; Write Portable Code; Do not use RTTI or ... Use Namespace Qualifiers to Implement Previously Declared Functions ......
Read more >7 Environments | Advanced R - Hadley Wickham
There's no direct link between the package and namespace environments; the link is defined by the function environments. 7.4.4 Execution environments. The last ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I write a simple base on example/streaming.py and python-onvif-zeep/issues/4, it work nice with HiKvision camera, as follow:
I know this is old, but if anyone faces this issue, try to replace the code in
client.py - ONVIFService - __init__
Fromto