Unable to run/use some python scripts from repository

Hello,
can somebody advise why at least two python scripts from repository (AverrationsRemove.py and DBXtract.py) do not work properly?
I’m using latest Siril 1.40 rc2 on Ubuntu 22.04
Python environment seems is installed correctly and other python scripts are working fine.
When I start AberrationRemover.py script, it’s dialog window opens normally. But then after click on ‘Load Model’, file selection window opens with no way to choose any file there (seems like mouse selection/click action is not working). Also I see error in console :

Starting script /home/andy/.local/share/siril-scripts/processing/AberrationRemover.py
17:56:13: Detected ONNX Runtime with providers: [‘TensorrtExecutionProvider’, ‘CUDAExecutionProvider’, ‘AzureExecutionProvider’, ‘CPUExecutionProvider’]
17:56:13: ONNX Runtime is already installed: onnxruntime-gpu
17:56:14: Latest GitHub release version for riccardoalberghi/abberation_models: 1.0.0
17:56:14: Running command: requires
17:56:14: OK! This script is compatible with this version of Siril.
17:56:22: Exception in Tkinter callback
17:56:22: Traceback (most recent call last):
17:56:22: File “/usr/lib/python3.10/tkinter/init.py”, line 1921, in call
17:56:22: return self.func(*args)
17:56:22: File “/home/andy/.local/share/siril-scripts/processing/AberrationRemover.py”, line 203, in _browse_model
17:56:22: filename = filedialog.askopenfilename(
17:56:22: File “/home/andy/.local/share/siril/venv/lib/python3.10/site-packages/sirilpy/tkfilebrowser/functions.py”, line 228, in askopenfilename
17:56:22: dialog = FileBrowser(parent, mode=“openfile”, multiple_selection=False,
17:56:22: File “/home/andy/.local/share/siril/venv/lib/python3.10/site-packages/sirilpy/tkfilebrowser/filebrowser.py”, line 422, in init
17:56:22: self.left_tree.insert(“”, “end”, iid=l[0],
17:56:22: File “/usr/lib/python3.10/tkinter/ttk.py”, line 1361, in insert
17:56:22: res = self.tk.call(self._w, “insert”, parent, index,
17:56:22: _tkinter.TclError: Item /2 already exists

Same problem I see when I start DBExtract v1.0.0 script. Click on ‘select file’ opens file dialog but it’s not possible to select any file and it generates same error in console as mentioned above.

This appears to be a known bug in the tkfilebrowser submodule we include to make the Tk GUI somewhat more tolerable on Linux: it occurs when the script comes across two bookmarks or directory entries that reduce to the same canonical name, in that case it doesn’t handle the duplicates properly.

There is a merge request with a proposed fix at https://gitlab.com/free-astro/siril/-/merge_requests/964 - it would be really helpful if you could test the build artefact as I can’t reproduce it on my system. Just go to the link above, click on the “Pipelines” tab, select the most recent one and then the one for your OS - I assume Linux, so pick the AppImage. You can uncompress the download and run it directly from a terminal.

1 Like

Thanks ! Will check it

Great ! It works perfectly now ! Many thanks for the quick response and fix !

That’s great - I will merge the fix and it will feature in 1.4.1 - for now, that build will serve as a “fixed version of 1.4.0” :slight_smile:

1 Like

Great. Thank you !
P.S. I also noticed some python scripts (like DBExtract, NB_2_RGB and some others) unable to use compressed fits files with ‘.fz’ extensions. I understand this is not the same issue but can it be solved too ? Or this requires separate topic ?

Hello, I am using the Flatpak version and I see that there is no solution for it.

I downloaded the AppImage and it doesn’t run either. I tried restarting venv and got the following error:

18:05:31: Failed to create virtual environment: Child process exited with code 1

18:05:31: Failed to initialize Python virtual environment: Child process exited with code 1

Any idea?