-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
I'm getting the following error when trying to PullMessages before a successfull connection:
Traceback (most recent call last):
File "/home/gfuhr/projects/immediate-action-prototypes/onvif/.onvif/lib/python3.12/site-packages/onvif/operator.py", line 201, in call
result = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/gfuhr/projects/immediate-action-prototypes/onvif/.onvif/lib/python3.12/site-packages/zeep/proxy.py", line 46, in __call__
return self._proxy._binding.send(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/gfuhr/projects/immediate-action-prototypes/onvif/.onvif/lib/python3.12/site-packages/zeep/wsdl/bindings/soap.py", line 135, in send
return self.process_reply(client, operation_obj, response)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/gfuhr/projects/immediate-action-prototypes/onvif/.onvif/lib/python3.12/site-packages/zeep/wsdl/bindings/soap.py", line 229, in process_reply
return self.process_error(doc, operation)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/gfuhr/projects/immediate-action-prototypes/onvif/.onvif/lib/python3.12/site-packages/zeep/wsdl/bindings/soap.py", line 391, in process_error
raise Fault(
zeep.exceptions.Fault
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/gfuhr/projects/immediate-action-prototypes/onvif/onvif_listener.py", line 16, in <module>
msgs = pullpoint.PullMessages(Timeout="PT5S", MessageLimit=1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/gfuhr/projects/immediate-action-prototypes/onvif/.onvif/lib/python3.12/site-packages/onvif/utils/service.py", line 106, in wrapped_method
result = attr(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/gfuhr/projects/immediate-action-prototypes/onvif/.onvif/lib/python3.12/site-packages/onvif/services/events/pullpoint.py", line 22, in PullMessages
return self.operator.call(
^^^^^^^^^^^^^^^^^^^
File "/home/gfuhr/projects/immediate-action-prototypes/onvif/.onvif/lib/python3.12/site-packages/onvif/operator.py", line 210, in call
raise ONVIFOperationException(operation=method, original_exception=e)
onvif.utils.exceptions.ONVIFOperationException: ONVIF operation 'PullMessages' failed: SOAP Error: code=SOAP-ENV:Sender, subcode=InvalidArgs
Here's my code:
from onvif import ONVIFClient
client = ONVIFClient("192.168.1.107", 80, "****", "****")
device = client.devicemgmt() # Device Management (Core)
info = device.GetDeviceInformation()
print(info)
events = client.events() # Events
subscription_ref = client.events().CreatePullPointSubscription()
print(subscription_ref)
pullpoint = client.pullpoint(subscription_ref)
print("Listening for events...")
msgs = pullpoint.PullMessages(Timeout="PT5S", MessageLimit=1)
print("Received messages:")
for msg in msgs.NotificationMessage:
print(msg)before crashind that will print:
{
'Manufacturer': 'AXIS',
'Model': 'P3268-LVE',
'FirmwareVersion': '12.4.59',
'SerialNumber': 'B8A44FA0DC7A',
'HardwareId': '968.33'
}
{
'SubscriptionReference': {
'Address': {
'_value_1': 'http://192.168.1.107/onvif/services',
'_attr_1': None
},
'ReferenceParameters': {
'_value_1': [
<Element {http://www.axis.com/2009/event}SubscriptionId at 0x75400f610480>
],
'_attr_1': None,
'SubscriptionId': 8
},
'Metadata': None,
'_value_1': None,
'_attr_1': None
},
'CurrentTime': datetime.datetime(2026, 1, 21, 21, 8, 35, tzinfo=<isodate.tzinfo.Utc object at 0x75400ff30dd0>),
'TerminationTime': datetime.datetime(2026, 1, 21, 21, 13, 35, tzinfo=<isodate.tzinfo.Utc object at 0x75400ff30dd0>),
'_value_1': None
}
Listening for events...same happened when using the pull_live_events.py sample.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working