Error in AcquireAndDisplay with Spinnaker Python
AnsweredI installed Spinnaker Python 3.1.0.79 on Ubuntu 20.04 (Python version 'Python 3.8.10'). I have Blackfly S BFS-U3-13Y3M. I try to run the example of Python package to acquire images with the camera, but this is the error:
ubuntu@ubuntu:~/Spinnaker/spinnaker_python-3.1.0.79-cp38-cp38-linux_aarch64/Examples/Python3$ sudo python3 AcquireAndDisplay.py
[sudo] password for ubuntu:
Library version: 3.1.0.79
Number of cameras detected: 1
Running example for camera 0...
*** IMAGE ACQUISITION ***
Acquisition mode set to continuous...
Acquiring images...
Device serial number retrieved as 22392339...
Press enter to close the program..
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
Traceback (most recent call last):
File "AcquireAndDisplay.py", line 314, in <module>
if main():
File "AcquireAndDisplay.py", line 294, in main
result &= run_single_camera(cam)
File "AcquireAndDisplay.py", line 238, in run_single_camera
result &= acquire_and_display_images(cam, nodemap, nodemap_tldevice)
File "AcquireAndDisplay.py", line 182, in acquire_and_display_images
if keyboard.is_pressed('ENTER'):
AttributeError: module 'keyboard' has no attribute 'is_pressed'
terminate called after throwing an instance of 'Spinnaker::Exception'
what(): Spinnaker: Can't clear a camera because something still holds a reference to the camera [-1004]
Aborted
----
how can I fix it?
-
Official comment
thank you, problem solved! the version of the keyboard is good, I think the problem was the directory in which I installed it.
-
Hi Silvia,
It could be that wrong version of keyboard was installed before running this example project.
Please double check that required version of matplotlib and keyboard are properly installed following the README instructions part of spinnaker python package.
Otherwise, you could open a support ticket via our contact form at https://flir.custhelp.com/app/ask to work through it together.
Regards,
Ifeanyi
0
Please sign in to leave a comment.
Comments
2 comments