Sun Dec 31, 2023 10:18 pm
Mon Jan 01, 2024 3:49 am
Mon Jan 01, 2024 4:48 am
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=
pdb.gimp_file_save(exportImage,exportLayer,filePath,filePath,run_mode=RUN_INTERACTIVE)
Sat Jan 13, 2024 12:19 pm
nelo wrote:I never put "RUN-NONINTERACTIVE" in my scripts.
Maybe you just leave that out?
pdb.gimp_file_load_layers(TheImage, "/Graphix/Templates/2023_isdi_xga2_04.xcf")
Sat Jan 13, 2024 12:23 pm
ofnuts wrote:In Python the "run mode" parameter is actually an optional named parameter:
- Code:
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.
pdb.gimp_file_load_layers(TheImage, "/Graphix/Templates/2023_isdi_xga2_04.xcf", run_mode=RUN_INTERACTIVE)
Sat Jan 13, 2024 12:24 pm
Sat Jan 13, 2024 7:35 pm
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=