[docs] [issue36689] docs: os.path.commonpath raises ValueError for different drives

Christoph Reiter report at bugs.python.org
Sun Apr 21 05:09:18 EDT 2019


New submission from Christoph Reiter <reiter.christoph at gmail.com>:

Since I just got bit by this despite reading the docs:

https://docs.python.org/3.8/library/os.path.html#os.path.commonpath

It lists various error cases where ValueError is raised but is missing the case where absolute paths on Windows are on different drives and I forgot to handle that:

  File "C:/building/msys64/mingw64/lib/python3.7\ntpath.py", line 631, in commonpath
    raise ValueError("Paths don't have the same drive")
ValueError: Paths don't have the same drive

----------
assignee: docs at python
components: Documentation
messages: 340604
nosy: docs at python, lazka
priority: normal
severity: normal
status: open
title: docs: os.path.commonpath raises ValueError for different drives
type: enhancement
versions: Python 3.8

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


More information about the docs mailing list