This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Built-in open function fail. Too many file open
Type: Stage:
Components: None Versions: Python 2.3
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: alexteo21, georg.brandl
Priority: normal Keywords:

Created on 2007-06-07 08:35 by alexteo21, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg32237 - (view) Author: Alex (alexteo21) Date: 2007-06-07 08:35
Hi,

I have created a cron script using python.
Every hour it will batch process certain files

e.g.

t=open(filename,'rb')
data=t.read()
#processing data...
t.close()

The script is working fine on the day of execution.
It is able to process the files.  However, when the next day comes, the processing fail!!

Traceback (most recent call last):
  File "./alexCopy.py", line 459, in processRequestModule
    sanityTestSteps(reqId,model)
  File "./alexCopy.py", line 699, in sanityTestSteps
    t = open(filename, 'rb')
IOError: [Errno 24] Too many open files:

I have explicitly closed the file.
Please help.

Thanks,
Alex
msg32238 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2007-06-07 10:20
This is very likely not caused by a Python bug.

Please discuss your script and the error in the comp.lang.python group.
History
Date User Action Args
2022-04-11 14:56:24adminsetgithub: 45050
2007-06-07 08:35:19alexteo21create