[Python-bugs-list] [ python-Bugs-408884 ] File not closed
noreply@sourceforge.net
noreply@sourceforge.net
Thu, 15 Mar 2001 11:31:40 -0800
Bugs item #408884, was updated on 2001-03-15 11:31
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=408884&group_id=5470
Category: None
Group: None
Status: Open
Priority: 5
Submitted By: Charles Hixson (quixo)
Assigned to: Nobody/Anonymous (nobody)
Summary: File not closed
Initial Comment:
Python 2.1a2 (#10, Feb 2 2001, 16:01:03) [MSC 32 bit
(Intel)] on win32
OS Win95 4.00.950 B
In IDLE 0.6 I execute a script that is intended to
create a file. An indexing error occurs (I used a
paren instead of a square bracket to access a
dictionary). The program aborts:
Traceback (most recent call last):
File "C:\Docs\TIP html\tipRec2Html.py", line 509, in ?
test()
File "C:\Docs\TIP html\tipRec2Html.py", line 439, in test
laTitle = leadAgencies(leadAgncy)
TypeError: object is not callable: {'sonco': 'Son Co
Transit', 'santro ....
Rerunning the program yields:
Traceback (most recent call last):
File "C:\Docs\TIP html\tipRec2Html.py", line 509, in ?
test()
File "C:\Docs\TIP html\tipRec2Html.py", line 415, in test
os.unlink(here + '\html\' + fl)
OSError: [Errno 13] Permission denied: 'C:\Docs\TIP
html\html\hson.htm'
This is the file that was being created when the prior
error occured. It appears that the file hasn't been
released. This can be worked around by quitting IDLE
and re-executing it.
If you look at the code you'll probably see that I'm
new to Python. I made some obvious silly decisions,
just to keep the code easier to think about. The html1
file mainly declares a couple of methods for writing
out descriptions of HTML table cells, either with or
without titles. (Sorry there was only room to include
one file... if I'd thought ahead I would have zipped them.)
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=408884&group_id=5470