E0109 12:47:01.371635 ServerContext.cpp:303] Error in the Lua callback while receiving an instance: Cannot execute a Lua command (code 2031)
Line 13 of the lua script = local target = assert(io.open(uncompressed, ‘wb’))
The script has full read and write permissions belonging to user and group orthanc, so I am hoping for some guidance as to why the script is giving me this error.
Server details: Debian Stretch, Orthanc 1.2.0+dfsg-1 installed.
If used as such, this sample script will write the temporary files in the current working directory of the Orthanc command. If you use the default service of the Debian package, the current working directory will be “/usr/sbin/”, which is hold by the “root” user and where the “orthanc” user cannot write.
Replace the path to the temporary files:
local uncompressed = instanceId .. '-uncompressed.dcm' [...] local compressed = instanceId .. '-compressed.dcm'
By for instance:
local uncompressed = '/tmp/orthanc-' .. instanceId .. '-uncompressed.dcm' [...] local compressed = '/tmp/orthanc-' .. instanceId .. '-compressed.dcm'
Please also make sure that the command-line tools “gdcmconv” and “dcmodify” are both available. Under Debian, you’ll have to install the “libgdcm-tools” and “dcmtk” packages.