Skip to content

Operation is not allowed due to current configuration. #21

@Jrendl

Description

@Jrendl

Hello. I am trying to initialize a PCANBasic object via the python-can ThreadSafeBus. I want to be able to receive my own messages for logging purposes on this bus but if I initialize it with the "receive_own_messages=True" kwarg I get the following error

can_bus = can.ThreadSafeBus(interface=self.config_values["can_interface"],
                                    channel=self.config_values["can_channel"],
                                    timing=self.bit_timing, fd=True , receive_own_messages=True)
  File "....venv/lib/python3.13/site-packages/can/thread_safe_bus.py", line 39, in __init__
    super().__init__(Bus(*args, **kwargs))
                     ~~~^^^^^^^^^^^^^^^^^
  File "...venv/lib/python3.13/site-packages/can/util.py", line 388, in wrapper
    return f(*args, **kwargs)
  File "...venv/lib/python3.13/site-packages/can/interface.py", line 135, in Bus
    bus = cls(channel, **kwargs)
  File "...venv/lib/python3.13/site-packages/can/interfaces/pcan/pcan.py", line 333, in __init__
    raise PcanCanInitializationError(self._get_formatted_error(result))
can.interfaces.pcan.pcan.PcanCanInitializationError: An operation is not allowed due to the current configuration

This is an FD bus (and a PCAN USB FD device). Is receive_own_messages not compatible with fd? why not?

Metadata

Metadata

Assignees

No one assigned

    Labels

    analyzingInvestigation required to understand the problem

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions