External editor does not open whn clicking 'edit' after exporting

I use the LUA script to export a .tiff file to the collection and then click ‘edit’ in lighttable to edit the file further in Affinity Photo. Sometimes this woks well, but most of the time it does not work and I get the message ‘error launching Affinity Photo’. I then have to go to the collection to open the file in APh. I am curious why is there not the possibility to export a tiff directly into an external editor from the Darktable. Do I only have the 'error launching Affinity Photo (or other editor) ’ error, or is it a known bug? I can’t see what I do wrong, because there’s no difference in my actions between it working well and not working.

  1. what is your operating system?
  2. what is your dt version
  3. are there any error messages if you start dt with “darktable -d lua” from the commandline

Does Your folder names and filenames has pure english letters or language specific letters ?
In my case, when files and folders has only english letters- script works well, but when it has polish letters it refuses. LUA old time roots :wink:

My operating system is Windows 11. I use DT 4.2_OM-1, but the former version I used, 4.0_OM-1, had the same problem. I never started DT with “darktable -d lua” from the commandline (don’t even know how to do that.
I only use English letters and no language specific letters.

Create shortcut with darktable.
Open properties window and locate line which is blue highlighted.
And at the end enter -d lua.
Use this shortcut for launching darktable.

Try to investigate differences (folder, file).
Allways with the same file does’nt work or sometimes with “this” file works and sometimes does’nt work ?
Allways with all files with some folder works and allways with another folder does’nt work.


debug file with messages exist here C:\Users[username]\AppData\Local\Microsoft\Windows\INetCache\darktable\darktable-log.txt

Do you mean Windows properties window? I tried that, but no blue line to add -d lua.
I don’t know what you mean by ‘Try to inverstigate differences’ etc.
INetCache does not exist.

Yes, it does, but it’s hidden. Enable display of hidden items in Explorer:

Edit: updated based on External editor does not open whn clicking 'edit' after exporting - #9 by apostel338

At least on W11, it’s not enough to show hidden files. You also need to uncheck hide protected system files in the folder options (or whatever it’s called in english) .


1 Like

If you type the folder names (or copy and paste from here), it will open the folder too.

Thanks for the info.
I found the INetCache/drarktable-log.txt, but its empty.
I also added -d lua in the properties window, but the first file I exported again gave the ‘error launching Affinity Photo’ error.

Yep, that argument (-d lua) was not supposed to fix anything, only provide more information on what goes wrong when you try to launch the external editor. Was your darktable-log.txt empty even with that argument added?

Yes, just tried it again and it stays empty