Run GIMP Python script from command line

315 Views Asked by At

I'm trying to run a GIMP script that I had working on a Mac earlier in the year. Only now I'm on a PC, and I can't seem to get it to run.

Originally, on the Mac I processed a folder of images with:

/Applications/Gimp-2.10.app/Contents/MacOS/gimp -idfs --batch-interpreter python-fu-eval -b "import sys;sys.path=['.']+sys.path;import myscript;myscript.run('./images')" -b "pdb.gimp_quit(1)"

So, on the Win 7 PC, using the same myscript.py script I try to run it with the command prompt from images folder:

cd %~dp0
"D:\GIMP2\bin\gimp-2.10.exe" -idfs --batch-interpreter python-fu-eval -b "import sys;sys.path=['.']+sys.path;import myscript;myscript.run('./images')" -b "pdb.gimp_quit(1)"

Only I get the error:

batch command experienced an execution error gimp_check_updates_callback: loading of https://www.gimp.org/gimp_versions.json failed: GET request failed: WinHttp error: SECURE_FAILURE (Type any character to close this window)

So I'm none the wiser for knowing where I'm going wrong.

0

There are 0 best solutions below