GIMP Chat http://gimpchat.com/ |
|
Load As Layers Wire Initialization Error With Python http://gimpchat.com/viewtopic.php?f=9&t=20690 |
Page 1 of 1 |
Author: | Thoth [ Sun Dec 31, 2023 10:18 pm ] |
Post subject: | Load As Layers Wire Initialization Error With Python |
Hello People, Calling gimp-file-load-layers results in (python2:24932): LibGimpBase-ERROR **: 09:10:03.138: gimp_wire_write_msg: the wire protocol has not been initialized. pdb.gimp_file_load_layers(RUN-NONINTERACTIVE, TheImage, "/Path/To/the_file.xcf"). The operations before the above statement to resize the image and the canvas work fine. The plugin will not load unless I have that line commented. With it uncommented I see the same wire protocol error. Various searches regarding the wire protocol have not resulted in anything useful. What causes this? How can I open a GIMP file as layers using python script? GIMP 2.10.20 GIMP 2.10.20 Python Console Python 2.7.5 (default, Apr 2 2020, 13:16:51) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] Thanks =thoth= |
Author: | nelo [ Mon Jan 01, 2024 3:49 am ] |
Post subject: | Re: Load As Layers Wire Initialization Error With Python |
I never put "RUN-NONINTERACTIVE" in my scripts. Maybe you just leave that out? |
Author: | ofnuts [ Mon Jan 01, 2024 4:48 am ] |
Post subject: | Re: Load As Layers Wire Initialization Error With Python |
Thoth wrote: Hello People, Calling gimp-file-load-layers results in (python2:24932): LibGimpBase-ERROR **: 09:10:03.138: gimp_wire_write_msg: the wire protocol has not been initialized. pdb.gimp_file_load_layers(RUN-NONINTERACTIVE, TheImage, "/Path/To/the_file.xcf"). The operations before the above statement to resize the image and the canvas work fine. The plugin will not load unless I have that line commented. With it uncommented I see the same wire protocol error. Various searches regarding the wire protocol have not resulted in anything useful. What causes this? How can I open a GIMP file as layers using python script? GIMP 2.10.20 GIMP 2.10.20 Python Console Python 2.7.5 (default, Apr 2 2020, 13:16:51) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] Thanks =thoth= In Python the "run mode" parameter is actually an optional named parameter: Code: Select all pdb.gimp_file_save(exportImage,exportLayer,filePath,filePath,run_mode=RUN_INTERACTIVE) And since it defaults to RUN_NONINTERACTIVE it can be left out in most cases. |
Author: | Thoth [ Sat Jan 13, 2024 12:19 pm ] |
Post subject: | Re: Load As Layers Wire Initialization Error With Python |
nelo wrote: I never put "RUN-NONINTERACTIVE" in my scripts. Maybe you just leave that out? Hallo Nelo, Leaving it out results in the wire initialization error as well. Code: Select all pdb.gimp_file_load_layers(TheImage, "/Graphix/Templates/2023_isdi_xga2_04.xcf") =thoth= |
Author: | Thoth [ Sat Jan 13, 2024 12:23 pm ] |
Post subject: | Re: Load As Layers Wire Initialization Error With Python |
ofnuts wrote: In Python the "run mode" parameter is actually an optional named parameter: Code: Select all pdb.gimp_file_save(exportImage,exportLayer,filePath,filePath,run_mode=RUN_INTERACTIVE) And since it defaults to RUN_NONINTERACTIVE it can be left out in most cases. Hi efnuts, This also resulted in the Wire Initialization error. Code: Select all pdb.gimp_file_load_layers(TheImage, "/Graphix/Templates/2023_isdi_xga2_04.xcf", run_mode=RUN_INTERACTIVE) =thoth= |
Author: | Thoth [ Sat Jan 13, 2024 12:24 pm ] |
Post subject: | Re: Load As Layers Wire Initialization Error With Python |
Hi All, I am going to try to reach out to the GIMP maintainers. If I find a solution, I will post it here. =thoth= |
Author: | ofnuts [ Sat Jan 13, 2024 7:35 pm ] |
Post subject: | Re: Load As Layers Wire Initialization Error With Python |
Thoth wrote: Hi All, I am going to try to reach out to the GIMP maintainers. If I find a solution, I will post it here. =thoth= Can you show the full code? It looks like your plugin doesn't register properly. |
Page 1 of 1 | All times are UTC - 5 hours [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |