RL_out_sharp outputs only one random image from the whole batch

Hello!

I have installed the LUA Script pack downloaded from GitHub, activated only one of them - RL_out_sharp (it’s all I want). I also downloaded GMIC CLI for Windows and specified the path to the GMIC executable.

In general the script does its job, however, when I select more than one image in the Lighttable view, Darktable seems to export all of them, but only one, random, sharpened image appears in the destination output folder.

My files and paths do not contain white spaces.

I would appreciate you help :pray:

Can you run it from a command prompt with the argument -d lua. This will output to a log file in your documents directory.

I tested on Linux and it works for me.

Here is the output of -d lua > log.txt 2>&1

darktable 5.2.0
Copyright (C) 2012-2025 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.5.0
  Colord                 -> DISABLED
  gPhoto2                -> ENABLED
  OSMGpsMap              -> ENABLED  - map view is available
  GMIC                   -> ENABLED  - Compressed LUTs are supported
  GraphicsMagick         -> ENABLED
  ImageMagick            -> DISABLED
  libavif                -> ENABLED
  libheif                -> ENABLED
  libjxl                 -> ENABLED
  LibRaw                 -> ENABLED  - Version 0.22.0-Devel202502
  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.

     0.0002 [dt starting]
 darktable.exe -d lua

See if there is a file, Documents\Darktable\darktable-log.txt. I think that location is hard coded for windows.

It didn’t show up, however I run -d lua again and now it has some more information:

darktable 5.2.0
Copyright (C) 2012-2025 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.5.0
  Colord                 -> DISABLED
  gPhoto2                -> ENABLED
  OSMGpsMap              -> ENABLED  - map view is available
  GMIC                   -> ENABLED  - Compressed LUTs are supported
  GraphicsMagick         -> ENABLED
  ImageMagick            -> DISABLED
  libavif                -> ENABLED
  libheif                -> ENABLED
  libjxl                 -> ENABLED
  LibRaw                 -> ENABLED  - Version 0.22.0-Devel202502
  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.

     0.0002 [dt starting]
 darktable.exe -d lua
    63,9337 LUA opened file
[gmic]./ Start G'MIC interpreter (v.3.5.5).
[gmic]./ Input all frames of TIFF file 'C:\Users\micha\AppData\Local\Temp\BXH13646.tif' at position 0 (1 image 1600x1066x1x3).
[gmic]./ Deblur image [0] using Richardson-Lucy algorithm, with sigma 0.70, 10 iterations and gaussian kernel.
[gmic]./ Divide image [0] by 256.
[gmic]./ Cut image [0] in range [0,255].
[gmic]./ Round values of image [0] by 1 and nearest rounding.
[gmic]./ Output image [0] as jpg file 'C:\Users\micha\Desktop\web-photos\BXH13646.jpg', with quality 90% (1 image 1600x1066x1x3).
[gmic]./ End G'MIC interpreter.
    64,6412 LUA result from windows command was 0
INFO: Could not find files for the given pattern(s).
INFO: Could not find files for the given pattern(s).
INFO: Could not find files for the given pattern(s).
    68,9292 LUA ERROR : ...cha\AppData\Local\darktable/lua/contrib/RL_out_sharp.lua:109: attempt to concatenate a nil value (global 'MODULE')
stack traceback:
	[C]: in metamethod 'concat'
	...cha\AppData\Local\darktable/lua/contrib/RL_out_sharp.lua:109: in upvalue 'preserve_metadata'
	...cha\AppData\Local\darktable/lua/contrib/RL_out_sharp.lua:178: in function <...cha\AppData\Local\darktable/lua/contrib/RL_out_sharp.lua:130>

The error message it tried to print was that exiftool was not found, so it couldn’t copy the tags over. I’ll fix the missing MODULE error.

1 Like

The error is fixed. The next time you start darktable the fix should be pulled down automatically.

2 Likes

Seems to be working. Thank you!