[Python] Python Gimp plugin failing to register - gimp_wire_read() error

Discussão em 'Python' iniciado por Stack, Dezembro 6, 2024.

  1. Stack

    Stack Membro Participativo

    I'm attempting to write a Python plugin for Gimp (2.10.38). Right now, it is absolutely barebones to just register the function and run main, but it is failing to register and show up in the program.

    #!/usr/bin/python

    from gimpfu import *

    def msg(txt):
    pdb.gimp_message(txt)

    msg('Running knitpc')

    def knitpc(timg, tdrawable):
    pdb.gimp_message('Hello ')

    register(
    'knit_pc_plugin',
    'Test plugin',
    'Test plugin',
    'Me',
    'Me',
    '2024',
    '<Image>/Image/Knit...',
    '*',
    [],
    [],
    knitpc
    )

    msg('Registered function')

    main()

    msg('Ran main')


    I do not find an option for it under the Image menu, nor can I find in the Plugin Browser. Running gimp-2.10 --verbose shows the following in the console with no further information:

    Querying plug-in: 'C:\Users\alpac\AppData\Roaming\GIMP\2.10\plug-ins\knit_pc_plugin.py'
    gimp-2.10.exe: LibGimpBase-WARNING: gimp-2.10.exe: gimp_wire_read(): error


    Running python knit_pc_plugin.py gives the No module named 'gimpfu' error, but does not indicate any syntax errors.

    I have also tried removing the timg, tdrawable params from knitpc, which made no difference.

    Continue reading...

Compartilhe esta Página