Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
too many files open
#6
(Jul-18-2023, 05:53 AM)perfringo Wrote: In code provided there is nowhere to be seen closing img.
Yes, the code provided is one of maybe 10 alternatives I tried. Just to give you an idea.
Open an image, cut it into pieces, save pieces, close everyting. So Simple.

Yes I did "with ...as ..". , yes I closed everything I could close, ... to no avail.

I did some limited testing , along the lines of win 11 with python version 3.11.2 does work with batches of 4000,
and win 10 with python version 3.11.2 getting error 24 with batches of 4000. ( = my laptop).
I upgraded to python 3.11.4 on the win 10 laptop, and lo and behold, it does 4000 as we are speaking.
About 2 minutes per 4000.
I would prefer doing batches of 50.0000 of course, but I lost so much time on this already, I'll test it later.
I was rather hoping that somebody would know how to close all filepointers, in a program, taking care of error 24.
Paul
It is more important to do the right thing, than to do the thing right.(P.Drucker)
Better is the enemy of good. (Montesquieu) = French version for 'kiss'.
Reply


Messages In This Thread
too many files open - by DPaul - Jul-16-2023, 12:45 PM
RE: too many files open - by DPaul - Jul-17-2023, 01:31 PM
RE: too many files open - by Larz60+ - Jul-17-2023, 03:04 PM
RE: too many files open - by DPaul - Jul-17-2023, 05:16 PM
RE: too many files open - by perfringo - Jul-18-2023, 05:53 AM
RE: too many files open - by DPaul - Jul-18-2023, 06:25 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  The Open Open Open Source Project GareBearH 1 2,714 May-14-2021, 10:48 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020