(Resolved) Lua script stops loading when initiating select non existing

This new problem occurred today for no known reason. When I start DT it goes successfully through the process of initiating previously chosen lua scripts such as rename, but then when it tries to load the lua script for select non existing it loads this feature but leaves me with this window but the script manager doesn’t load. Al else seems to be working fine in DT.

Can you start dt from the terminal with the option -d lua? Share the output here.

same problem as Terry. Am currently using DT without the LUA Scripts. Explained my problem in detail in another post on the same subject

I started the way you suggested to Terry. The behaviour is the same. It gets stuck on the command prompt window as before

LUA script manager also disappered with 4.7.0+877~g533290f29c, Linux, Ubuntu 22.04 with my previous local settings and databases :

/opt/darktable/bin/darktable --library /home/ph/.config/darktable-dev/library.db --configdir /home/ph/.config/darktable-dev/ --cachedir /home/ph/.cache/darktable-dev/ -d lua
darktable 4.7.0+877~g533290f29c
Copyright (C) 2012-2024 Johannes Hanika and other contributors.

Compile options:
  Bit depth              -> 64 bit
  Debug                  -> DISABLED
  SSE2 optimizations     -> ENABLED
  OpenMP                 -> ENABLED
  OpenCL                 -> ENABLED
  Lua                    -> ENABLED  - API version 9.3.0
  Colord                 -> ENABLED
  gPhoto2                -> ENABLED
  GMIC                   -> DISABLED - Compressed LUTs are NOT supported
  GraphicsMagick         -> ENABLED
  ImageMagick            -> DISABLED
  libavif                -> DISABLED
  libheif                -> DISABLED
  libjxl                 -> DISABLED
  OpenJPEG               -> ENABLED
  OpenEXR                -> ENABLED
  WebP                   -> ENABLED

See https://www.darktable.org/resources/ for detailed documentation.
See https://github.com/darktable-org/darktable/issues/new/choose to report bugs.

     5,7432 LUA ERROR : error loading module 'tools/script_manager' from file '/home/ph/.config/darktable-dev/lua/tools/script_manager.lua':
        /home/ph/.config/darktable-dev/lua/tools/script_manager.lua:516: invalid escape sequence near '"dir /b/s \s'

With a completely fresh install LUA mask manager is available :

/opt/darktable/bin/darktable --library /home/ph/.config/darktable-fresh/library.db --configdir /home/ph/.config/darktable-fresh/ --cachedir /home/ph/.cache/darktable-fresh/ -d lua
darktable 4.7.0+877~g533290f29c
Copyright (C) 2012-2024 Johannes Hanika and other contributors.

Compile options:
  Bit depth              -> 64 bit
  Debug                  -> DISABLED
  SSE2 optimizations     -> ENABLED
  OpenMP                 -> ENABLED
  OpenCL                 -> ENABLED
  Lua                    -> ENABLED  - API version 9.3.0
  Colord                 -> ENABLED
  gPhoto2                -> ENABLED
  GMIC                   -> DISABLED - Compressed LUTs are NOT supported
  GraphicsMagick         -> ENABLED
  ImageMagick            -> DISABLED
  libavif                -> DISABLED
  libheif                -> DISABLED
  libjxl                 -> DISABLED
  OpenJPEG               -> ENABLED
  OpenEXR                -> ENABLED
  WebP                   -> ENABLED

See https://www.darktable.org/resources/ for detailed documentation.
See https://github.com/darktable-org/darktable/issues/new/choose to report bugs.

     8,3607 LUA ERROR : cannot open /home/ph/.config/darktable-fresh/luarc: Datei oder Verzeichnis nicht gefunden
Klone nach '/home/ph/.config/darktable-fresh/lua' …
remote: Enumerating objects: 4233, done.
remote: Counting objects: 100% (781/781), done.
remote: Compressing objects: 100% (400/400), done.
remote: Total 4233 (delta 446), reused 685 (delta 374), pack-reused 3452
Empfange Objekte: 100% (4233/4233), 1.28 MiB | 4.21 MiB/s, fertig.
Löse Unterschiede auf: 100% (2703/2703), fertig.
    28,4885 LUA DEBUG: script_manager.lua: ensure_lib_in_search_path: 515: line is /home/ph/.config/darktable-fresh/lua/lib/dtutils/debug.lua 
    28,4886 LUA DEBUG: script_manager.lua: ensure_lib_in_search_path: 517: /home/ph/.config/darktable-fresh/lua/lib/dtutils/debug.lua is already in search path, returning... 
    28,4887 LUA DEBUG: script_manager.lua: ensure_lib_in_search_path: 515: line is /home/ph/.config/darktable-fresh/lua/lib/dtutils/file.lua 
    28,4887 LUA DEBUG: script_manager.lua: ensure_lib_in_search_path: 517: /home/ph/.config/darktable-fresh/lua/lib/dtutils/file.lua is already in search path, returning... 
    28,4887 LUA DEBUG: script_manager.lua: ensure_lib_in_search_path: 515: line is /home/ph/.config/darktable-fresh/lua/lib/dtutils/log.lua 
    28,4888 LUA DEBUG: script_manager.lua: ensure_lib_in_search_path: 517: /home/ph/.config/darktable-fresh/lua/lib/dtutils/log.lua is already in search path, returning... 
    28,4888 LUA DEBUG: script_manager.lua: ensure_lib_in_search_path: 515: line is /home/ph/.config/darktable-fresh/lua/lib/dtutils.lua 
    28,4889 LUA DEBUG: script_manager.lua: ensure_lib_in_search_path: 517: /home/ph/.config/darktable-fresh/lua/lib/dtutils.lua is already in search path, returning... 
    28,4890 LUA DEBUG: script_manager.lua: ensure_lib_in_search_path: 515: line is /home/ph/.config/darktable-fresh/lua/lib/dtutils/string.lua 
    28,4891 LUA DEBUG: script_manager.lua: ensure_lib_in_search_path: 517: /home/ph/.config/darktable-fresh/lua/lib/dtutils/string.lua is already in search path, returning... 
    28,4892 LUA DEBUG: script_manager.lua: ensure_lib_in_search_path: 515: line is /home/ph/.config/darktable-fresh/lua/lib/dtutils/system.lua 
    28,4892 LUA DEBUG: script_manager.lua: ensure_lib_in_search_path: 517: /home/ph/.config/darktable-fresh/lua/lib/dtutils/system.lua is already in search path, returning...

For me removing /lua folder from ~/.config/darktable and letting dt rebuild it solved the issue.

Sorry. I don’t know what to type here to generate a log file.

You can find instructions on the forum, they have been provided several times. Also in the manual. Even in this topic:

darktable -d lua

darktable-log.txt (183.9 KB)
I can only hope this is the log file you want.

Probably yes:

16.9101 LUA DEBUG: script_manager.lua: ensure_lib_in_search_path: 515: line is C:\Users\tpinf\AppData\Local\darktable\lua\lib\dtutils.lua 
16.9103 LUA ERROR : ...inf\AppData\Local\darktable/lua/tools/script_manager.lua:521: attempt to concatenate a nil value (local 'path')

The exact same problem, with the same message (log from “darktable.exe -d lua”):

16.9101 LUA DEBUG: script_manager.lua: ensure_lib_in_search_path: 515: line is C:\Users\tpinf\AppData\Local\darktable\lua\lib\dtutils.lua
16.9103 LUA ERROR : …inf\AppData\Local\darktable/lua/tools/script_manager.lua:521: attempt to concatenate a nil value (local ‘path’)

just appeared also in my setup (Windows 11, darktable 4.6.1).

darktable-log.txt (1.4 KB)

I added the ability to include libraries from other directories (as used in git-annex). Unfortunately I didn’t test is on windows and windows doesn’t seem to like it, so I revered the change.

Restarting darktable should pull the updated script_manager, though you’ll have start darktable a second time to get it to use the updated version. If this doesn’t work, then remove the lua directory in your %LOCALAPPDATA%\darktable folder and let darktable reinstall the lua scripts.

That was exactly what I needed. Thanks

Hi Bill. Will this problem just disappear if I wait for your next weekly build in a couple of days? I am happy to wait if that is all I need to do. BTW, thanks for all the effort with the weekly builds and the effort you put into the Lua scripts. They really add great functionality to DT.

wcript_manager “should” automatically pull the update the next time darktable starts. script_manager will still hang because it’s actually running the old code. The next time it starts it’ll use the code it downloaded and be fixed.

If after starting darktable twice you still don’t have script_manager, then remove (or rename) the lua directory and just let darktable reinstall the scripts.

I did as you suggested, removing the lua directory in local...., reinstalled darktable with the latest build. Darktable did not create the lua directory, and in the windows/program files /darktable the lua directory is blank except for a debugfile.

FYI

This is what it looks like
image

Here is the logfile
darktable-log.txt (28.5 KB)

The lua directory you are talking about is part of the darktable distribution, not the directory for the lua scripts. The lua scripts directory is located at %LOCALAPPDATA%\darktable\lua. Open a command prompt and enter the command cd %LOCALAPPDATA%\darktable\lua`.

When you start darktable after installing it, there should be a scripts installer at the bottom of the left panel. Use that to install the scripts.

Double restart functioned perfectly!
lua scripts are a very good feature of darktable, and would miss it a lot …
Thank you!

Thanks Bill, I wish all my computer problems were this easy to resolve. As you said after simply restarting DT twice the script manager reappeared with no effort form me.

Resolved. I Inadvertently changed the options in the preferences. That was causing the problem for me.

Thanks Bill