Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GimpHelpers
#1
This thread is for questions and comments on my GimpHelper module to make writing plugins a bit easier by:
  • keeping the boilerplate code to a minimum
  • doing some housekeeping (undo groups and error catching)
  • allowing as many checks as possible in an IDE to reduce the debug times in Gimp
  • helping your IDE do useful code completion
GimpHelpers is here.
Reply
#2
Hi ofnuts,

The appimage is only giving a wire read error on full-dialog. The others load OK. Here are the errors:

 plug-ins/full-dialog/full-dialog.py'
Traceback (most recent call last):
  File plug-ins/full-dialog/full-dialog.py", line 104, in <module>
    class FullDialog(HelpedPlugin):
  File "plug-ins/full-dialog/full-dialog.py", line 138, in FullDialog
    icon=getIcon(__file__)
         ^^^^^^^^^^^^^^^^^
  File "/plug-ins/full-dialog/gimphelpers.py", line 79, in getIcon
    return Gio.File.new_build_filenamev([os.path.dirname(file), getDomain(file)+'.png'])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: type object 'File' has no attribute 'new_build_filenamev'
/tmp/.mount_GIMP-3EnhjAm/usr/bin/gimp: LibGimpBase-WARNING: gimp: gimp_wire_read(): unexpected EOF
Terminating plug-in: '/home/user/.config/GIMP/3.0/plug-ins/full-dialog/full-dialog.py'
Reply
#3
(11-28-2024, 09:01 PM)Tas_mania Wrote: Hi ofnuts,

The appimage is only giving a wire read error on full-dialog. The others load OK. Here are the errors:

 plug-ins/full-dialog/full-dialog.py'
Traceback (most recent call last):
  File plug-ins/full-dialog/full-dialog.py", line 104, in <module>
    class FullDialog(HelpedPlugin):
  File "plug-ins/full-dialog/full-dialog.py", line 138, in FullDialog
    icon=getIcon(__file__)
         ^^^^^^^^^^^^^^^^^
  File "/plug-ins/full-dialog/gimphelpers.py", line 79, in getIcon
    return Gio.File.new_build_filenamev([os.path.dirname(file), getDomain(file)+'.png'])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: type object 'File' has no attribute 'new_build_filenamev'
/tmp/.mount_GIMP-3EnhjAm/usr/bin/gimp: LibGimpBase-WARNING: gimp: gimp_wire_read(): unexpected EOF
Terminating plug-in: '/home/user/.config/GIMP/3.0/plug-ins/full-dialog/full-dialog.py'

You can comment out the icon=getIcon(__file__)  line (I doubt you have an icon anyway). 

What is your version of Gio? 

new_build_filenamev (exists since 2.76). I'm on 2.80 (can't find version for Gio, but GLib is 2.80 according to dpkg. I'll try to replace with a less cutting edge call.
Reply
#4
Commited c99b5b5 (0.0.4). Should fix the problem
Reply
#5
   

Thats good all 4 gimphelpers plugins show in the menu and load. I see no console errors at all. I moved to Fedora 41 for testing because Its new and uncluttered.

When I apply full dialog I get errors. They maybe caused by this appimage which is a product of gimp-git but mostly complete.



Gimp.main(FullDialog.__gtype__, sys.argv)
/home/user/.config/GIMP/3.0/plug-ins/full-dialog/full-dialog.py:142: Warning: Two different plugins tried to register 'gegl_op_average'.
  Gimp.main(FullDialog.__gtype__, sys.argv)

(full-dialog.py:4764): GLib-GIO-CRITICAL **: 09:46:16.184: g_file_get_parent: assertion 'G_IS_FILE (file)' failed
[full-dialog] The catalog directory set by set_i18n() is not a subdirectory: locale
[full-dialog] Localization disabled
Reply
#6
(11-28-2024, 11:01 PM)Tas_mania Wrote: Thats good all 4 gimphelpers plugins show in the menu and load. I see no console errors at all. I moved to Fedora 41 for testing because Its new and uncluttered.

When I apply full dialog I get errors. They maybe caused by this appimage which is a product of gimp-git but mostly complete.



Gimp.main(FullDialog.__gtype__, sys.argv)
/home/user/.config/GIMP/3.0/plug-ins/full-dialog/full-dialog.py:142: Warning: Two different plugins tried to register 'gegl_op_average'.
  Gimp.main(FullDialog.__gtype__, sys.argv)

(full-dialog.py:4764): GLib-GIO-CRITICAL **: 09:46:16.184: g_file_get_parent: assertion 'G_IS_FILE (file)' failed
[full-dialog] The catalog directory set by set_i18n() is not a subdirectory: locale
[full-dialog] Localization disabled

Warning: Two different plugins isn't due to my code. It's all over the place, It also happens in Gimp 2.10...

The second one is this (and even if you create the appropriate directories you will still have it). Awaiting for a fix with baited breath, so I can have people provide translations of the plugins.
Reply


Forum Jump: