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

works exactly once, after that it throws BrickNotFoundError #77

Closed
oliverkurth opened this issue Apr 4, 2016 · 7 comments
Closed

works exactly once, after that it throws BrickNotFoundError #77

oliverkurth opened this issue Apr 4, 2016 · 7 comments

Comments

@oliverkurth
Copy link

Hi,
I installed nxt-python, version 2.2.2-2 in a Ubuntu 15.10 vm, and connected a nxt with USB. I tried the spin.py program from the examples and it works, but only once. When I try it again, I get the exception BrickNotFoundError:

vmware@ubuntu:/python-nxt$ ./spin.py
vmware@ubuntu:
/python-nxt$ ./spin.py
Fantom module unavailable, not searching there
Traceback (most recent call last):
File "./spin.py", line 12, in
b = nxt.locator.find_one_brick()
File "/usr/lib/python2.7/dist-packages/nxt/locator.py", line 137, in find_one_brick
raise BrickNotFoundError
nxt.locator.BrickNotFoundError
vmware@ubuntu:~/python-nxt$

When I unplug the nxt and plug it in again it works again, but only once.

I configured the name and host id in ~/.nxt-python, but it makes no difference.

It's an old NXT, in case that matters. FW version is 1.03.

@lkvapil
Copy link

lkvapil commented Apr 18, 2016

I have the same error

@oliverkurth
Copy link
Author

It works fine on a Raspberry Pi, but not in a VMware VM. @lkvapil what is your environment?

@Eelviny
Copy link
Collaborator

Eelviny commented Apr 19, 2016

Strange, very strange... @oliverkurth, If you've got a USB bluetooth dongle around, are you able to test a bluetooth connection with VMWare?

@lkvapil
Copy link

lkvapil commented May 9, 2016

What did you mean by that ? - Raspberry Pi 2, Raspbian 2015.09

@Eelviny
Copy link
Collaborator

Eelviny commented May 11, 2016

@lkvapil, what @oliverkurth means by "environment", is your operating system and software versions.

e.g. I'm running Ubuntu 14.04 with Python 3.5.1 and nxt-python 2.2.2-2

@mattschueler
Copy link

I have gotten this issue sometimes when running my code, I think it is caused by not "closing" the connection properly, because it happens only when running a second time. Only way I have been able to fix it is by restarting my kernel or unplugging and plugging the NXT back into my PC. I would suggest running with debug=True and seeing what the stack trace says, it's usually pretty informative.

@schodet
Copy link
Owner

schodet commented Nov 16, 2021

Should be fixed by the reset PyUSB call now. Please reopen if you can still reproduce with master branch and python3.

@schodet schodet closed this as completed Nov 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants