PEAK Pcan M2 : raise RuntimeError('Event loop is closed')

This forum covers PCAN-Linux and Linux development issues concerning our products
Post Reply
elpimous12
Posts: 43
Joined: Tue 3. Aug 2021, 23:34

PEAK Pcan M2 : raise RuntimeError('Event loop is closed')

Post by elpimous12 » Sun 5. Sep 2021, 20:01

python3.8
ros noetic
Peak can board M2

Hello the team,
I need to use asyncio in my code, and it returns an error after the first query. Any idea ?

Here is my code : https://pastebin.com/ndcbTS59
here is the terminal error : https://pastebin.com/DRjCrz1Z

the main() is ru the first time, and works correctly.
On the second run, errors appear.

Any idea ?

Best regards, the team.
Vincent

M.Heidemann
Sales & Support
Sales & Support
Posts: 673
Joined: Fri 20. Sep 2019, 13:31

Re: PEAK Pcan M2 : raise RuntimeError('Event loop is closed')

Post by M.Heidemann » Mon 6. Sep 2021, 07:43

Hello Vincent,

Thank you for your request.

We are not familiar with python-CAN or ROS and therefore
cannot provide support in that regard.

A bad callback could be due to referencing a class
directly instead of an object of the class, but we have no way
of confirming that's the case with your code.

Please check if this might be the case.

Best Regards

Marvin

Post Reply