christiansandberg / python-can-remote

CAN over network bridge for Python
MIT License
48 stars 20 forks source link

client shutdown error in master branch #35

Open arimakai opened 8 months ago

arimakai commented 8 months ago

Dear, After I run test code from master bran I found error from client side

Traceback (most recent call last):
  File "/home/user/test2.py", line 18, in <module>
    bus.shutdown()
  File "/home/user/env/lib/python3.10/site-packages/can_remote/client.py", line 94, in shutdown
    super().shutdown()
  File "/usr/lib/python3.10/site-packages/can/bus.py", line 414, in shutdown
    self.stop_all_periodic_tasks()
  File "/usr/lib/python3.10/site-packages/can/bus.py", line 299, in stop_all_periodic_tasks
    for task in self._periodic_tasks:
AttributeError: 'RemoteBus' object has no attribute '_periodic_tasks'

Test code copy from readme of this project and I think it come from last commit to add super().shutdown() Because of RemoteBus class use parent class can.bus.BusABC, I not sure it should be run super().init() or not? The server.py has not problem because it use instance variable.

Regards