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:
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.