Open FireNWater opened 2 days ago
The error message 'Failed to acquire camera: Device or resource busy' indicates that the camera is in use by an other software. You already found that there are more than one instance of 'indi_pylibcamera' running at the same time.
I suppose you have a recent version (>2.1) of the 'indi_pylibcamera' driver. Since that version the driver detects other instances of itself and kills them. For detection it runs 'ps -ax' and searches 'python3' and 'indi_pylibcamera' in the lines. Could you please check:
Maybe AstroArch has changed the driver name or it starts the driver with 'python' and not with 'python3'. We will see that in the 'ps -ax' output.
Thank you for your reply. Yes, "ps-ax" is available on AstroArch. I will try to re-create the issue today now that I know where to look. I'm running the driver on an Rpi-5, so ekos is the only app using the driver. I will notify Matt of your reply, this seems like it should fix the problem.
I can also improve the detection of a running instance. But first I would need to know why it is not detected. The ps -ax
output would really help.
I have a test Rpi, I will try to recreate and get you the output this afternoon.
pylibcameraerror.txt . That's the output from the ps -ax command when the pylibcamera driver continues running . .
I see. In your AstroArch the driver gets started with python
and not with python3
:
11044 ? Sl 1:07 /usr/bin/python /usr/bin/indi_pylibcamera
That's the reason why a running instance does not get detected when restarting the driver.
During the transition from Python 2 to Python 3 it was almost standard to start Python 2 with python
and Python 3 with python3
. Nowadays Python 2 disappears from distributions and it seems that python
becomes the new command to start Python 3.
Unfortunately the indi_pylibcamera
driver looks for python3
. I will fix this in the next version. For the meantime you can:
indi_pylibcamera.py
(it is likely somewhere in /lib/python*/
and you can search it with the command find /lib/python* -name indi_pylibcamera.py
)indi_pylibcamera.py
with a text editor (for instance nano
) and edit line 563:
original:
modified:
replace python3
by python
That should fix the issue for the current version.
Perfect, thank you so much for your quick response. I will forward this to Matt.
Would it be better to ask Matt to use python3 in future instead of python?
I am running kstars/ekos on a Raspberry Pi-5 w/NVME drive and AstroArch operating system. The developers of AA are using indipylibcamera to drive the Raspberry Pi HQ camera. This camera previously worked with Stellarmate and RpiOS. . When not_ starting from a fresh boot, we would get crashes from the indi_pylibcamera driver while starting the INDI drivers from ekos. This is the error message from the log file:
Hope this helps. Thank you for making this driver!!