[New-bugs-announce] [issue37515] `open("aux.txt", "w")` fails unexpectedly with FileNotFoundError on Windows

Carsten report at bugs.python.org
Sat Jul 6 13:04:53 EDT 2019


New submission from Carsten <carsten.knoll at posteo.de>:

I maintain a package which includes a package named "aux.py".
I could not install it on my windows machine via pip and others had the same problem also with windows.

I tracked down the problem to `io.open`. On my Windows 7 System with Python 3.7.1 from Anaconda, the following statements all result in a FileNotFoundError:

open("aux", "w")
open("Aux", "w")
open("AUX", "w")
open("aux.py", "w")
open("aux.py", "wb")
open("aux.txt", "w")


On the other hand the following commands work as expected:

open("aaux", "w")
open("AUX1.txt", "w")
open("aux2.py", "w")

etc.


Can anybody confirm this?


On Linux (I could not reproduce the problem.)

----------
components: IO
files: bug.png
messages: 347436
nosy: CarK
priority: normal
severity: normal
status: open
title: `open("aux.txt", "w")` fails unexpectedly with FileNotFoundError on Windows
versions: Python 3.7
Added file: https://bugs.python.org/file48459/bug.png

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37515>
_______________________________________


More information about the New-bugs-announce mailing list