[New-bugs-announce] [issue27356] csv

Fabian report at bugs.python.org
Mon Jun 20 11:24:24 EDT 2016


New submission from Fabian:

Hi,

I am running Canopy on Windows 7 64 bit.
When I run the attached file, I get the following error:


----> 5 with open('C:\Users\Anwender\Desktop\Test\blub.txt') as csvfile:
      6     dialekt = csv.Sniffer().sniff(csvfile.read(1024))

IOError: [Errno 22] invalid mode ('r') or filename: 'C:\\Users\\Anwender\\Desktop\\Test\x08lub.txt' 


As you see, Python complains about the file name after it changes the file name for no reason.

The thing is, when I use a capital letter after every back slash it is fine, but I needed quite some time to figure that out. So it is very annoying for everyone encountering the problem for the first time. 
Also numbers at the beginning of a file name seem not to work either.

Thank you for developing Python!

----------
components: Unicode
files: MesspunkteAusKurven.py
messages: 268904
nosy: bethard, ezio.melotti, fabian_b, haypo
priority: normal
severity: normal
status: open
title: csv
Added file: http://bugs.python.org/file43490/MesspunkteAusKurven.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27356>
_______________________________________


More information about the New-bugs-announce mailing list