When client.device_removed_handler += device_removed is called, the error below is thrown.
DeviceRemoved(device_index=0)
Task exception was never retrieved
future: <Task finished coro=<ButtplugClientWebsocketConnector._consumer_handler() done, defined at /usr/local/lib/python3.7/dist-packages/buttplug/client/websocket_connector.py:24> exception=AttributeError("'dict' object has no attribute 'remove'") created at /usr/lib/python3.7/asyncio/tasks.py:325>
source_traceback: Object created at (most recent call last):
File "Buttplug_Example.py", line 186, in
asyncio.run(main(), debug=True)
File "/usr/lib/python3.7/asyncio/runners.py", line 43, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.7/asyncio/base_events.py", line 571, in run_until_complete
self.run_forever()
File "/usr/lib/python3.7/asyncio/base_events.py", line 539, in run_forever
self._run_once()
File "/usr/lib/python3.7/asyncio/base_events.py", line 1767, in _run_once
handle._run()
File "/usr/lib/python3.7/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "Buttplug_Example.py", line 44, in try_connect
await client.connect(connector)
File "/usr/local/lib/python3.7/dist-packages/buttplug/client/client.py", line 85, in connect
await self.connector.connect()
File "/usr/local/lib/python3.7/dist-packages/buttplug/client/websocket_connector.py", line 22, in connect
asyncio.create_task(self._consumer_handler())
File "/usr/lib/python3.7/asyncio/tasks.py", line 325, in create_task
return loop.create_task(coro)
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/buttplug/client/websocket_connector.py", line 37, in _consumer_handler
await self._notify_observers(bp_msg)
File "/usr/local/lib/python3.7/dist-packages/buttplug/client/connector.py", line 52, in _notify_observers
await obs._handle_message(msg)
File "/usr/local/lib/python3.7/dist-packages/buttplug/client/client.py", line 176, in _handle_message
await self._parse_message(msg)
File "/usr/local/lib/python3.7/dist-packages/buttplug/client/client.py", line 144, in _parse_message
self.devices.remove(dr.device_index)
AttributeError: 'dict' object has no attribute 'remove
`
When
client.device_removed_handler += device_removed
is called, the error below is thrown.DeviceRemoved(device_index=0) Task exception was never retrieved future: <Task finished coro=<ButtplugClientWebsocketConnector._consumer_handler() done, defined at /usr/local/lib/python3.7/dist-packages/buttplug/client/websocket_connector.py:24> exception=AttributeError("'dict' object has no attribute 'remove'") created at /usr/lib/python3.7/asyncio/tasks.py:325> source_traceback: Object created at (most recent call last): File "Buttplug_Example.py", line 186, in
asyncio.run(main(), debug=True)
File "/usr/lib/python3.7/asyncio/runners.py", line 43, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.7/asyncio/base_events.py", line 571, in run_until_complete
self.run_forever()
File "/usr/lib/python3.7/asyncio/base_events.py", line 539, in run_forever
self._run_once()
File "/usr/lib/python3.7/asyncio/base_events.py", line 1767, in _run_once
handle._run()
File "/usr/lib/python3.7/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "Buttplug_Example.py", line 44, in try_connect
await client.connect(connector)
File "/usr/local/lib/python3.7/dist-packages/buttplug/client/client.py", line 85, in connect
await self.connector.connect()
File "/usr/local/lib/python3.7/dist-packages/buttplug/client/websocket_connector.py", line 22, in connect
asyncio.create_task(self._consumer_handler())
File "/usr/lib/python3.7/asyncio/tasks.py", line 325, in create_task
return loop.create_task(coro)
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/buttplug/client/websocket_connector.py", line 37, in _consumer_handler
await self._notify_observers(bp_msg)
File "/usr/local/lib/python3.7/dist-packages/buttplug/client/connector.py", line 52, in _notify_observers
await obs._handle_message(msg)
File "/usr/local/lib/python3.7/dist-packages/buttplug/client/client.py", line 176, in _handle_message
await self._parse_message(msg)
File "/usr/local/lib/python3.7/dist-packages/buttplug/client/client.py", line 144, in _parse_message
self.devices.remove(dr.device_index)
AttributeError: 'dict' object has no attribute 'remove
`