01-04-2025, 10:07 PM
Im sorry to have made you repeat yourself - I did find this answer eventually. I've tried running a simple batch process by loading a 'hello world' script into the scripts directory and starting it with
This fires up the script interpreter ok, but then fails with the error message:
The plugin code:
which I thought should run since its running as a batch process.
What I discovered does work is
so it looks as if the -b instruction is passing the argument directly to the interpreter, not treating it as a file name.
I'm stuck now. I appreciate your suggestion that there might be simpler ways of doing what I'm trying to do, but to be honest I'm so nearly finished it seems a waste to start again. Just need to get over this last hurdle!
Code:
flatpak run org.gimp.GIMP//beta --batch-interpreter python-fu-eval -i -b 'hello' --verbose
This fires up the script interpreter ok, but then fails with the error message:
Code:
GIMP-Error: Unable to run plug-in "hello.py"
(/home/chris/.config/GIMP/3.0/plug-ins/hello/hello.py)
Failed to execute child process “/home/chris/.config/GIMP/3.0/plug-ins/hello/hello.py” (Exec format error)
The plugin code:
Code:
#!/usr/bin/env python3
def run():
print("Hello World!")
if __name__ == "__main__":
print "Running as __main__ with args: %s" % sys.argv
run()
which I thought should run since its running as a batch process.
What I discovered does work is
Code:
flatpak run org.gimp.GIMP//beta --batch-interpreter python-fu-eval -i -b 'print("hello")'
hello
batch command executed successfully
so it looks as if the -b instruction is passing the argument directly to the interpreter, not treating it as a file name.
I'm stuck now. I appreciate your suggestion that there might be simpler ways of doing what I'm trying to do, but to be honest I'm so nearly finished it seems a waste to start again. Just need to get over this last hurdle!