It is currently Tue Jul 02, 2024 12:57 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Load As Layers Wire Initialization Error With Python
PostPosted: Sun Dec 31, 2023 10:18 pm  (#1) 
Offline
New Member

Joined: Dec 31, 2023
Posts: 4
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=


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Load As Layers Wire Initialization Error With Python
PostPosted: Mon Jan 01, 2024 3:49 am  (#2) 
Offline
GimpChat Member
User avatar

Joined: Sep 27, 2016
Posts: 345
Location: Germany, BW
I never put "RUN-NONINTERACTIVE" in my scripts.
Maybe you just leave that out?

_________________
Regards
nelo

(Gimp 2.10 on Linux Mint MATE 20.1)


Top
 Post subject: Re: Load As Layers Wire Initialization Error With Python
PostPosted: Mon Jan 01, 2024 4:48 am  (#3) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4752
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.

_________________
Image


Top
 Post subject: Re: Load As Layers Wire Initialization Error With Python
PostPosted: Sat Jan 13, 2024 12:19 pm  (#4) 
Offline
New Member

Joined: Dec 31, 2023
Posts: 4
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.

pdb.gimp_file_load_layers(TheImage, "/Graphix/Templates/2023_isdi_xga2_04.xcf")


=thoth=


Top
 Post subject: Re: Load As Layers Wire Initialization Error With Python
PostPosted: Sat Jan 13, 2024 12:23 pm  (#5) 
Offline
New Member

Joined: Dec 31, 2023
Posts: 4
ofnuts wrote:
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.


Hi efnuts,

This also resulted in the Wire Initialization error.

pdb.gimp_file_load_layers(TheImage, "/Graphix/Templates/2023_isdi_xga2_04.xcf", run_mode=RUN_INTERACTIVE)



=thoth=


Top
 Post subject: Re: Load As Layers Wire Initialization Error With Python
PostPosted: Sat Jan 13, 2024 12:24 pm  (#6) 
Offline
New Member

Joined: Dec 31, 2023
Posts: 4
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=


Top
 Post subject: Re: Load As Layers Wire Initialization Error With Python
PostPosted: Sat Jan 13, 2024 7:35 pm  (#7) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4752
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.

_________________
Image


Top
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Performance of adjusting layers and exporting with Python Fu

5

No new posts Curve Bend tool called from python giving error not very consistent.

0

No new posts Attachment(s) Python occasional "Unexpected error: [Errno 9] Bad file descriptor"

3

No new posts Attachment(s) Wire art

7

No new posts Attachment(s) Barbed Wire brush

11



* Login  



Powered by phpBB3 © phpBB Group