hardbyte / python-can

The can package provides controller area network support for Python developers
https://python-can.readthedocs.io
GNU Lesser General Public License v3.0
1.31k stars 604 forks source link

AttributeError: property 'protocol' of 'RemoteBus' object has no setter #1809

Closed ptoews closed 4 months ago

ptoews commented 4 months ago

Describe the bug

Traceback (most recent call last):
  File "C:\Users\Philipp.Toews\AppData\Roaming\JetBrains\PyCharmCE2024.1\scratches\scratch_56.py", line 3, in <module>
    b1 = can.interface.Bus(bustype="remote", channel="ws://localhost:54701")
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Philipp.Toews\Development\Datalogger\DLv2\venv_312\Lib\site-packages\can\util.py", line 379, in wrapper
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "C:\Users\Philipp.Toews\Development\Datalogger\DLv2\venv_312\Lib\site-packages\can\interface.py", line 135, in Bus
    bus = cls(channel, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Philipp.Toews\Development\Datalogger\DLv2\venv_312\Lib\site-packages\can_remote\client.py", line 35, in __init__
    self.protocol = RemoteClientProtocol(config, websocket)
    ^^^^^^^^^^^^^
AttributeError: property 'protocol' of 'RemoteBus' object has no setter

To Reproduce

import can

b1 = can.interface.Bus(bustype="remote", channel="ws://localhost:54701")

Additional context

OS and version: Windows 10 Python version: 3.12 python-can version: 4.4.2 python-can interface/s (if applicable): remote

Update: 4.2.2 is the last version where it worked

zariiii9003 commented 4 months ago

Update python-can-remote. This should be fixed in 0.2.2.

ptoews commented 4 months ago

Thanks!