[ python-Bugs-931336 ] RecenFilesList mysteriously containing str
with NULL bytes
SourceForge.net
noreply at sourceforge.net
Wed Apr 7 17:25:15 EDT 2004
Bugs item #931336, was opened at 2004-04-07 16:25
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=931336&group_id=5470
Category: IDLE
Group: Irreproducible
Status: Open
Resolution: None
Priority: 5
Submitted By: Gustavo Tabares (gustabares)
Assigned to: Nobody/Anonymous (nobody)
Summary: RecenFilesList mysteriously containing str with NULL bytes
Initial Comment:
Please note that I have only seen this a few (3) times. I
am unable to reproduce this.
When I attempt to start IDLE from within Windows it
does not bring up any window. When I tried to start it
from the command line, I received this error:
C:\Python23\Lib\idlelib>python idle.py
Traceback (most recent call last):
File "idle.py", line 23, in ?
idlelib.PyShell.main()
File "C:\Python23\lib\idlelib\PyShell.py", line 1271, in
main
flist.new()
File "C:\Python23\lib\idlelib\FileList.py", line 62, in new
return self.EditorWindow(self, filename)
File "C:\Python23\lib\idlelib\PyShell.py", line 80, in
__init__
EditorWindow.__init__(self, *args)
File "C:\Python23\lib\idlelib\EditorWindow.py", line 186,
in __init__
self.UpdateRecentFilesList()
File "C:\Python23\lib\idlelib\EditorWindow.py", line 595,
in UpdateRecentFilesList
rfList=self.__CleanRecentFiles(rfList)
File "C:\Python23\lib\idlelib\EditorWindow.py", line 620,
in __CleanRecentFiles
if not os.path.exists(path[0:-1]):
File "C:\Python23\lib\ntpath.py", line 256, in exists
st = os.stat(path)
TypeError: stat() argument 1 must be (encoded string
without NULL bytes), not str
With a little print statement of what "path" is in this
case, I found out that it is the following:
['\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
\x00\x00\x00\x00\x00']
I have worked around the problem by clearing out rfList
on line 619 of EditorWindow.py. I'm guessing I'm getting
into some sort of weird state but it is worth mentioning.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=931336&group_id=5470
More information about the Python-bugs-list
mailing list