Issue 1603336: f=open fails with TypeError (original) (raw)

Issue1603336

Created on 2006-11-26 20:08 by gibholio, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
BatchGen.py gibholio,2006-11-26 20:08 Script to generate batch file to automate ImageMagick conversions
Messages (3)
msg30678 - (view) Author: Gibholio (gibholio) Date: 2006-11-26 20:08
I've found that Python 2.5 halts, giving a TypeError, when opening a file to write to. This is the error (path is shortened for compactness): Traceback (most recent call last): File "C:\...\BatchGen.py", line 32, in f=open('ImGen.bat', 'w') TypeError: an integer is required I noticed that calling an external command via os.system() would always make the error occur, but now it is happening all the time. I've tried this on two machines, both running Windows XP SP2.
msg30679 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-11-26 20:47
This looks a bit fishy to me. Are you sure that "open" isn't bound to something else in your script? (Try replacing it with "file" for a start)
msg30680 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-11-27 07:31
Sorry, didn't see the attached file.
History
Date User Action Args
2022-04-11 14:56:21 admin set github: 44279
2006-11-26 20:08:47 gibholio create