[New-bugs-announce] [issue46916] There is a problem with escape characters in the path passed in by pathlib.Path.mkdir()

Vincent FUNG report at bugs.python.org
Thu Mar 3 17:17:38 EST 2022


New submission from Vincent FUNG <vincent201399 at gmail.com>:

This problem occurs when the directory starts with 't', but works with os.makedirs(e) or macOS.

>>> e = Path(r'F:\ceven\test2')
>>> e.mkdir()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Program Files\Python310\lib\pathlib.py", line 1173, in mkdir
    self._accessor.mkdir(self, mode)
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'F:\\ceven\\test2'
>>> os.makedirs(e)

----------
components: Windows
messages: 414483
nosy: paul.moore, steve.dower, tim.golden, vincent.fung, zach.ware
priority: normal
severity: normal
status: open
title: There is a problem with escape characters in the path passed in by pathlib.Path.mkdir()
type: behavior
versions: Python 3.10

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


More information about the New-bugs-announce mailing list