darktable-org / lua-scripts

155 stars 110 forks source link

Lua Script: ext_editor. Export to collection fails under Windows 11. #401

Closed Juangg77 closed 4 months ago

Juangg77 commented 1 year ago

I've got an installation of Darktable 4.2 under Windows 11 Pro. I've installed git and the extension "ext_editor" through Darktable's script manager. When I try to export a picture to the current collection, the program throws the following error message: Error moving file C:\Users(my username)\AppData\Local\Temp(filename) I've realised that the TIFF file is created in the Temp folder but it seems the collection in Darktable is not updated with the new file. My Images folder is backed up in Microsoft Onedrive so the pictures are stored locally but synched with the cloud, I don't know if that could be a problem but I'm giving all the possible details. I don't know what the issue could be.

The details of my installation are as follows: darktable version : 4.2.0 OS : Windows 11 Pro CPU: Ryzen 5700U with Radeon Graphics Memory : 16 Gb Graphics card : Integrated AMD Vega Graphics export module error

Juangg77 commented 1 year ago

Update: It seems that the issue has to do with the fact that my Images folder is under Onedrive. I've tried moving some pictures to a completely offline folder and the script works with them. Should I close the report or is there any way to fix it?

wpferguson commented 1 year ago

Go ahead and leave it open for now. I'll have to gen up a Win 11 machine and test it against one drive and see what is really happening and if there is any way to fix it.

DarekGH commented 1 year ago

Does username has only pure english letters or it has language specific letters ?

Look at https://github.com/darktable-org/lua-scripts/issues/402

Darek

Juangg77 commented 1 year ago

International letters only. There's no special character in it. In the Onedrive path, there is an "á". I'm Spanish, so the pictures are stored in a folder named "Imágenes". Could that be the problem?

DarekGH commented 1 year ago

Put original file on OneDrive to another folder with only pure english letters and try again. As I observe temp dir on drive C should be with only english letters, original folder should be with only english letters and file name should be with only english letters. LUA is based on C and function which is used for copying/moving files do not recognized unicode but only old character coding (as I understud this https://stackoverflow.com/questions/54118507/lua-how-to-make-os-rename-os-remove-work-with-filenames-containing-unicode-ch discussion) .

Juangg77 commented 1 year ago

Thanks a lot DarekGH, that did the trick. I didn't realised that those characters would be a problem.

DarekGH commented 1 year ago

I hope here is a solution https://gist.github.com/Egor-Skriptunoff/2458547aa3b9210a8b5f686ac08ecbf0#file-utf8_filenames-lua But I am not a programmer and I don't know what and where (which lua file) I should enter to achieve desired result.

JAVIBARAKA commented 1 year ago

Tengo exactamente el mismo problema con ext_editor y, no sé como solucionarlo. Alguien me puede ayudar?. Gracias. darktable_1 darktable_2