Skip to content

Notifier thread closed when exception occurs on bus.recv expect repoting to listener only #1667

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
prunith opened this issue Sep 28, 2023 · 2 comments
Labels

Comments

@prunith
Copy link

prunith commented Sep 28, 2023

Describe the bug

When bus.recv raise an error notifier thread is stoped. Role of notifier is to cascade issue to the listener but not close itself

To Reproduce

Create CAN conection and produce failure on hardware that raise an error. Notifier catch the error but close the thread

Expected behavior

cascade exception to the listener to allow more precise control of failure

Additional context

OS and version: windows
Python version: 3
python-can version: 4.2.2
python-can interface/s (if applicable): mine is Ixxat and error raised is "Error warning limit"

@prunith prunith added the bug label Sep 28, 2023
@lumagi
Copy link
Collaborator

lumagi commented Oct 8, 2023

I wouldn't call this a bug, but rather intended behavior. What is the full error stack trace and message? If your bus is operating correctly, there shouldn't be any errors raised. If I had to deduce from the error message, I would say your bus is potentially incorrectly configured.

@zariiii9003
Copy link
Collaborator

That changed in develop branch: #1645. The listeners can choose to ignore exceptions if Listener.on_error returns True

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants