Gimp-Forum.net
Failing on loading script Mac OS X: gimp_check_updates_callback failed - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: Extending the GIMP (https://www.gimp-forum.net/Forum-Extending-the-GIMP)
+---- Forum: Scripting questions (https://www.gimp-forum.net/Forum-Scripting-questions)
+---- Thread: Failing on loading script Mac OS X: gimp_check_updates_callback failed (/Thread-Failing-on-loading-script-Mac-OS-X-gimp-check-updates-callback-failed)



Failing on loading script Mac OS X: gimp_check_updates_callback failed - frankytanky - 06-07-2021

Hi, I had a script that was working for me on Mac OS X


Code:
franky@frank ~ % /Applications/GIMP-2.10.app/Contents/MacOS/gimp -i -b "(let* ( ( image (car (file-png-load 1 "\\""/Users/franky/Desktop/image.png"\\"" "\\""/Users/franky/Desktop/image.png"\\"") ) ) (drawable (car (gimp-image-active-drawable image) ) ) ) (plug-in-colortoalpha 1 image drawable '(0 0 0) ) (gimp-file-save RUN-NONINTERACTIVE image drawable "\\""/Users/franky/Desktop/image2.png"\\"" "\\""/Users/franky/Desktop/image2.png"\\"") ) " -b "(gimp-quit 0)"
 
To run color to alpha, I was working on some shell scripts with a python virtual environment in it this morning and something I've done seems to have confused Gimp - maybe in regards to Python version?

I now get this error when I try to run it: 


Code:
GIMP is started as MacOS application
gimp_check_updates_callback: loading of https://www.gimp.org/gimp_versions.json failed: Operation not supported
batch command experienced an execution error:
Error: eval: unbound variable: \/Users/coopermor/Desktop/Armato-Side-Table_render_shadow_difference.png\

Any ideas? Thanks so much! Happy to provide any additional details that are helpful.


RE: Failing on loading script Mac OS X: gimp_check_updates_callback failed - Ofnuts - 06-08-2021

Check updates callback has nothing to do with it. This is just the last message of your Gimp initialization...

Not a scripf-fu specialist, but it seems it understands a string as a variable name. Your code suffers from the "dancing toothpicks" syndrome, if the script-fu code requires double quotes, you can use single quotes at the shell level:

Code:
gimp -b '(function "string")'


This removes the need to use a confusing and confused double-meta-indirect escaping Smile