This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vincent.fung
Recipients paul.moore, steve.dower, tim.golden, vincent.fung, zach.ware
Date 2022-03-03.22:58:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1646348323.79.0.985992964457.issue46916@roundup.psfhosted.org>
In-reply-to
Content
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)



Another question about \t:

If a directory is passed as a parameter it will not be possible to use the parameter as a raw string. os.makedirs gives the same error whether it's r'%s' or repr().
History
Date User Action Args
2022-03-03 22:58:43vincent.fungsetrecipients: + vincent.fung, paul.moore, tim.golden, zach.ware, steve.dower
2022-03-03 22:58:43vincent.fungsetmessageid: <1646348323.79.0.985992964457.issue46916@roundup.psfhosted.org>
2022-03-03 22:58:43vincent.funglinkissue46916 messages
2022-03-03 22:58:43vincent.fungcreate