Skip to content
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

Getting Fatal Python error while running ramp.py example. #351

Open
salocinx opened this issue Aug 4, 2022 · 3 comments
Open

Getting Fatal Python error while running ramp.py example. #351

salocinx opened this issue Aug 4, 2022 · 3 comments
Labels

Comments

@salocinx
Copy link

salocinx commented Aug 4, 2022

Hi. I try to run ramp.py on Windows 10 with Python 3.10.6 64bit installed. The rotors ramp up, but when the process finishes, I get the following error:

PS E:\crazyflie\tests> python .\ramp.py

Connecting to radio://0/10/2M/E7E7E7E7E7
Disconnected from radio://0/10/2M/E7E7E7E7E7
Fatal Python error: _enter_buffered_busy: could not acquire lock for <_io.BufferedWriter name='<stdout>'> at interpreter shutdown, possibly due to daemon threads
Python runtime state: finalizing (tstate=0x0000028f52c7bad0)

Current thread 0x00002568 (most recent call first):
  <no Python frame>

Am I doing something wrong?

@knmcguire
Copy link
Member

Hi!

Yes I'm able to recreate this with windows 11 and python 3.10.

It is due to this line somehow:

Thread(target=self._ramp_motors).start()

But on the first look there doesn't seem there is anything wrong with it? There is probably some bad thread handling going on here but we will need to investigate.

Thanks for reporting!

@knmcguire knmcguire added the bug label Aug 5, 2022
@salocinx
Copy link
Author

salocinx commented Aug 6, 2022

Hi! The example basically runs fine and the issue only arises shortly before the process finishes. No hurry at all. Thanks for keeping an eye on this.

@knmcguire
Copy link
Member

ah oke! For me it actually fails immediately and the motors don't spin up at all.

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

2 participants