Helmut Jarausch <[EMAIL PROTECTED]> added the comment:
>> Could you tell us what this 1665th line should be?
>> Maybe the 1665th directory has something special (a filename with >>
>> spaces or non-ascii chars...)
Yes, the next directory contains a filename with an iso-latin1 but non-
ascii cha
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:
The original problem seems to come from some Unix platform, but this
patch only handles two cases:
- on win32, when the argument is a bytestring.
- on OS/2.
And in both cases, the default (utf-8) conversion seems wrong. Something
like cp
Benjamin Peterson <[EMAIL PROTECTED]> added the comment:
It seems the conversion to unicode strings (PyUnicode vs PyBytes) was
not complete in os.listdir. See the attached patch.
--
keywords: +patch
Added file: http://bugs.python.org/file10719/oslistdir_string.patch
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:
"he's giving a string"... the user simply called os.walk, which accepts
strings AFAIK.
We should discover what produced this bytestring. Does listdir() returns
a mixed list of strings and bytes?
--
resolution: invalid ->
statu
Benjamin Peterson <[EMAIL PROTECTED]> added the comment:
It's failing because he's giving a string to bytes.startswith when it
requires a byte string or such.
--
nosy: +benjamin.peterson
resolution: -> invalid
status: open -> closed
___
Python tracke
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:
Could you tell us what this 1665th line should be?
Maybe the 1665th directory has something special (a filename with spaces
or non-ascii chars...)
Can you try with an older version of python?
--
nosy: +amaury.forgeotdarc
_
New submission from Helmut Jarausch <[EMAIL PROTECTED]>:
The script below produces 1664 lines of output before it bails out with
Traceback (most recent call last):
File "WalkBug.py", line 5, in
for Dir, SubDirs, Files in os.walk('/home/jarausch') :
File "/usr/local/lib/python3.0/os.py", line