ERROR:root:got unexpected error processing a message: Cannot serialize Python type "None".
Traceback (most recent call last):
File "/venv/lib/python3.8/site-packages/dbus_next/message_bus.py", line 621, in _on_message
self._process_message(msg)
File "/venv/lib/python3.8/site-packages/dbus_next/message_bus.py", line 712, in _process_message
handler(msg, send_reply)
File "/venv/lib/python3.8/site-packages/dbus_next/message_bus.py", line 734, in handler
send_reply(Message.new_method_return(msg, method.out_signature, body, fds))
File "/venv/lib/python3.8/site-packages/dbus_next/message_bus.py", line 637, in __call__
bus.send(reply)
File "/venv/lib/python3.8/site-packages/dbus_next/aio/message_bus.py", line 326, in send
self._writer.schedule_write(msg, future)
File "/venv/lib/python3.8/site-packages/dbus_next/aio/message_bus.py", line 82, in schedule_write
self.buffer_message(msg, future)
File "/venv/lib/python3.8/site-packages/dbus_next/aio/message_bus.py", line 78, in buffer_message
(msg._marshall(negotiate_unix_fd=self.negotiate_unix_fd), copy(msg.unix_fds), future))
File "/venv/lib/python3.8/site-packages/dbus_next/message.py", line 215, in _marshall
body_block = Marshaller(self.signature, self.body)
File "/venv/lib/python3.8/site-packages/dbus_next/_private/marshaller.py", line 8, in __init__
self.signature_tree.verify(body)
File "/venv/lib/python3.8/site-packages/dbus_next/signature.py", line 359, in verify
type_.verify(body[i])
File "/venv/lib/python3.8/site-packages/dbus_next/signature.py", line 287, in verify
self._verify_array(body)
File "/venv/lib/python3.8/site-packages/dbus_next/signature.py", line 229, in _verify_array
child_type.verify(member)
File "/venv/lib/python3.8/site-packages/dbus_next/signature.py", line 259, in verify
raise SignatureBodyMismatchError('Cannot serialize Python type "None"')
dbus_next.errors.SignatureBodyMismatchError: Cannot serialize Python type "None"
The wrapped method in
service.method()(service.py line 91) does not return the value from the original method. This is confusing and limits the utility of the interface.conciser the following:
calling
do_more_thingswill raise a error:adding a return statement seems to fix this issue: