It is currently Mon Jul 01, 2024 12:39 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Python occasional "Unexpected error: [Errno 9] Bad file descriptor"
PostPosted: Thu Mar 05, 2020 9:49 pm  (#1) 
Offline
New Member

Joined: Mar 05, 2020
Posts: 2
I have a batch python script that successfully runs through 22 images at a time, then crashes with the error "Unexpected error: [Errno 9] Bad file descriptor". After pointing it to the next set of images it continues for 22 more. Etc. ... Am I failing to properly dispose garbage or something?

Python plugin attached


Attachments:
og_batch_paintedworld_normals.zip [2.65 KiB]
Downloaded 76 times
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: Python occasional "Unexpected error: [Errno 9] Bad file descriptor
PostPosted: Thu Mar 05, 2020 9:54 pm  (#2) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 13068
Location: Native to NYC living in Arizona, Gimp 2.8 & 2.10, Win 11 PC.
Hello opusGlass.
I can't help you with this,
but there are a few really good coders here who can.

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Python occasional "Unexpected error: [Errno 9] Bad file descriptor
PostPosted: Fri Mar 06, 2020 8:19 am  (#3) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4752
Since you appear to be on Windows, I would first remove/comment out all the "print" statements. When their accumulated output reaches 4K bad things happen (running the code gimp-console could alleviate this, too).

_________________
Image


Top
 Post subject: Re: Python occasional "Unexpected error: [Errno 9] Bad file descriptor
PostPosted: Fri Mar 06, 2020 11:07 pm  (#4) 
Offline
New Member

Joined: Mar 05, 2020
Posts: 2
That was it! I noticed that it runs perfectly when pasted into the console but I didn't realize it was related to the print statements. Removing them fixes everything. Thanks!


Top
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts need Help- GIMP error opening RAW file with Darktable

5

No new posts Attachment(s) SOLVED Error when run Gimp appimage file

4

No new posts Load As Layers Wire Initialization Error With Python

6

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

0

No new posts Convert GIMP plugin from Python 2 to Python 3

4


cron

* Login  



Powered by phpBB3 © phpBB Group