[issue43491] Windows filepath bug

2021-03-14 Thread parsa mpsh


parsa mpsh  added the comment:

Yes. i checked it more. looks problem was from other thing, not the path.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43491] Windows filepath bug

2021-03-14 Thread Eryk Sun


Eryk Sun  added the comment:

"C:\some\path/some/file.txt" is a valid file path. The Windows file API 
normalizes most paths, except for verbatim paths that start with exactly 
"\\?\". Path normalization includes replacing forward slashes with backslashes.

If you provide the complete traceback, I may be able to help diagnose the 
problem, but not here. Please ask for help on 
https://discuss.python.org/c/users or 
https://mail.python.org/mailman/listinfo/python-list.

--
nosy: +eryksun
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43491] Windows filepath bug

2021-03-14 Thread parsa mpsh


Change by parsa mpsh :


--
components: +IO

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43491] Windows filepath bug

2021-03-14 Thread parsa mpsh


parsa mpsh  added the comment:

I think this bug should be fixed by converting all of `/`s to `\` in file paths 
automatic **When os is windows**.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43491] Windows filepath bug

2021-03-14 Thread parsa mpsh


parsa mpsh  added the comment:

Update: i only tested this bug in `3.6` and `3.7` i'm not sure about newer 
versions. but i think this bug also is in them.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43491] Windows filepath bug

2021-03-14 Thread parsa mpsh


New submission from parsa mpsh :

I was testing my program in github workflow and i detected a bug. i was opening 
a file in windows:

```
f = open(os.path.dirname(__FILE__) + '/some/file.txt')
```

means the file path will be `C:\some\path/some/file.txt`.

but i received OSError. why? because in the above path, we have both `/` and 
`\`.

I think this bug should be fixed by converting all of `/`s to `\` in file paths 
automatic.

--
components: Windows
messages: 388672
nosy: parsampsh, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Windows filepath bug
type: behavior
versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com