Open Crouze opened 2 days ago
Toggling all started lua scripts to off, restarting dt and then re-applying autostart for these lua scripts seems to have fixed it, oddly enough.
Could you tell me what scripts you had running when the error happened?
Error returned is index table and data table sizes differ. post-import-image events are corrupted.
This error is from the lua event registration code. Somehow it created a "partial" event, which should never happen.
error message: key 'apply your chosen style from exiftool tags' already registered for event shortcut
This is just a standard error message that you haven't configured any exif information with a style to apply.
Could you tell me what scripts you had running when the error happened?
The above mentioned official / contrib scripts, plus the post-import-film generate_cache() script mentioned in another post:
local dt = require "darktable"
dt.register_event(MODULE, "post-import-film",
function(event, images)
for key, image in ipairs(images) do
dt.print_log("generate cache " .. key .. ": " .. image.id)
image:generate_cache(true, 2, 8)
end
end
)
Error returned is index table and data table sizes differ. post-import-image events are corrupted. This error is from the lua event registration code. Somehow it created a "partial" event, which should never happen.
Can/should it be cleared up, i.e. the partial event removed? Is it a leftover from something happening wrong earlier, or is the partial event created every time somehow?
error message: key 'apply your chosen style from exiftool tags' already registered for event shortcut This is just a standard error message that you haven't configured any exif information with a style to apply.
Not quite, the exif information and style to apply is set in the lua configuration. The style is applied on import.
Can/should it be cleared up, i.e. the partial event removed?
It should not be able to occur. That's why I'm trying to figure out how it occurred. If I can reproduce it, then I can make sure it doesn't occur or if it's not preventable then mitigate it if it does occur.
Is it a leftover from something happening wrong earlier, or is the partial event created every time somehow?
I've never seen it occur and I write/use lots of Lua scripts
Understood. Let me know if I can be of any assistance, but as said once I cycled all started scripts the problem seems to have cleared. If there still is something lingering in a db however I would like to clean it up (I can't stand inconsistent data :wink: )
could you attach the generate_cache script? Just change the extension from .lua to .txt.
This error was something with script loading and event registration, so there should not be anything left laying around. When the script tries to register the event a consistency check is done before adding the event. The consistency check is what failed. I guess I could add a consistency check after an event is added to trap the culprit that actually added the bad event and then possibly revert it.
Sure, it's a simple script. Didn't you post it elsewhere yourself?
It looks like something I might have written, maybe when I first added generate_cache() to the API.
This and autostyle were the only scripts adding post-import-film events and neither should have caused a problem.
I set the priority to low because
Describe the bug
Starting a LUA script in script manager (autostyle in my case) fails with "contrib/autostyle failed to load". Starting dt with "-d lua" option shows the error message in the bug report title. If trying again for a second time it still fails to load but the rror message is different ("key 'apply your chosen style from exiftool tags' already registered for event shortcut").
Steps to reproduce
Expected behavior
LUA script is started
Logfile | Screenshot | Screencast
Commit
No response
Where did you obtain darktable from?
distro packaging
darktable version
4.8.1
What OS are you using?
Linux
What is the version of your OS?
Arch Linux x86_64, kernel 6.12.1-arch1-1
Describe your system?
Intel(R) Core(TM) i5-6300U (4) @ 3.00 GHz 16GB memory
Are you using OpenCL GPU in darktable?
Yes
If yes, what is the GPU card and driver?
Intel HD Graphics 520 @ 1.00 GHz [Integrated] (i915)
Please provide additional context if applicable. You can attach files too, but might need to rename to .txt or .zip
I have a second, completely separate, instance of dt on the same laptop which doesn't have this error.
The following lua scripts were started automatically: