Hi all,
I'm trying to use the paramter PAPERLESS_PRE_CONSUME_SCRIPT to run a python script. Has someone this up and running?
I think the script is called when I created the path in the same manner as above form SOULV1C described. But even a dummy script which just prints something is causing an error:
[2023-09-14 21:22:19,269] [INFO] [paperless.consumer] Executing pre-consume script /usr/src/paperless/scripts/info.py
[2023-09-14 21:22:19,293] [ERROR] [paperless.consumer] Error while executing pre-consume script: [Errno 8] Exec format error: '/usr/src/paperless/scripts/info.py'
Traceback (most recent call last):
File "/usr/src/paperless/src/documents/consumer.py", line 214, in run_pre_consume_script
completed_proc = run(
File "/usr/local/lib/python3.9/subprocess.py", line 505, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/local/lib/python3.9/subprocess.py", line 951, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/local/lib/python3.9/subprocess.py", line 1837, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: '/usr/src/paperless/scripts/info.py'
Any idea...?
Thanks