GIMP Python-Fu script not loading

I’m a beginner in coding and I find myself facing a problem that must be obvious to you. Sorry in advance for any technical vocabulary mistakes.

I’m trying to write a script to automate image processing. At first, I wanted to make a very simple code to see if it works, but it doesn’t.

My problem is as follows: I can’t launch my script in GIMP, in fact I can’t find it.

I’ll take the liberty of posting below the steps I’ve taken to see if this is the cause…

I wrote my simplified script in notepad called “simple_test.py”

from gimpfu import *

def simple_test():
    print("Le script simple fonctionne !")

register(
    "python_fu_simple_test",
    "Simple Test",
    "Un test simple",
    "Votre Nom",
    "Votre Nom",
    "2023",
    "Script Simple Test",
    "",
    [],
    [],
    simple_test,
    menu="<Image>/Filters/Test/"
)

main()
  • I saved the .py script in a folder called “macro_GIMPtest”.
    -I then went into GIMP: Edit>preference>folder>Scripts
  • chose the path to my folder containing the script (“macro_GIMPtest”) -> validate
    -closed GIMP, reopened GIMP
  • I went to Filter

And that’s where I can’t find my script.

I tried going to filter>Python-Fu>console, I did a search and the script wasn’t there either.

For information, I’m working on Windows11 with Phyton 2.7.5 and GIMP 2.10.36.

So, if you have any ideas to help me, I’d love to hear from you! Thank you in advance, have a nice day.

Bastien

Leave a Comment