[ python-Bugs-896236 ] Unicode problem in os.path.getsize ?
SourceForge.net
noreply at sourceforge.net
Thu Feb 12 21:49:48 EST 2004
Bugs item #896236, was opened at 2004-02-12 21:49
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=896236&group_id=5470
Category: Python Library
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Ronald L. Rivest (ronrivest)
Assigned to: Nobody/Anonymous (nobody)
Summary: Unicode problem in os.path.getsize ?
Initial Comment:
I am running on Windows XP 5.1 using python version 2.3.
The following simple code fails on my system.
for dirpath,dirnames,filenames in os.walk("C:/"):
for name in filenames:
pathname = os.path.join(dirpath,name)
size = os.path.getsize(pathname)
print size, pathname
I get an error from getsize that the file given by
pathname does not exist. When it breaks, the
variable "name" contains two question marks, which
makes me think that this is a Unicode problem.
In any case, shouldn't names returned by walk be
acceptable in all cases to getsize???
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=896236&group_id=5470
More information about the Python-bugs-list
mailing list