[issue42421] Native open failed to create a file on windows10 when colon exists in the name

2020-11-20 Thread Eryk Sun
Eryk Sun added the comment: > 'FocalMix: Semi-Supervised Learning for 3D Medical Image Detection.pdf' In a filesystem that supports file streams [1], such as NTFS or ReFS, the above name refers to a $DATA stream named " Semi-Supervised Learning for 3D Medical Image Detection.pdf" in a file n

[issue42421] Native open failed to create a file on windows10 when colon exists in the name

2020-11-20 Thread Steven D'Aprano
Steven D'Aprano added the comment: This is standard Windows behaviour, and goes back to DOS days. Reserved filenames and illegal characters are described here: https://docs.microsoft.com/en-gb/windows/win32/fileio/naming-a-file?redirectedfrom=MSDN If the Windows OS and file system does not a

[issue42421] Native open failed to create a file on windows10 when colon exists in the name

2020-11-20 Thread 嘉乐君子
New submission from 嘉乐君子 : with open('./pdfs/' + pdf_name, 'wb') as fo: fo.write(data) On Windows10, the native 'open' in Python3.7 failed to create a file if the name contains colon, such as 'FocalMix: Semi-Supervised Learning for 3D Medical Image Detection.pdf'. -- components: I