GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — os.path.realpath fails with WinError 161 · Issue #88980 · python/cpython

os.path.realpath fails with WinError 161 #88980

New issue
Copy link
New issue
Copy link
Closed
Closed
os.path.realpath fails with WinError 161#88980
Copy link
Labels
3.10 (EOL)end of lifeend of life3.11only security fixesonly security fixes3.12only security fixesonly security fixesOS-windowsstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

Spacetown
mannequin
opened on Aug 3, 2021
Issue body actions
BPO 44817
Nosy @pfmoore, @tjguk, @zware, @eryksun, @zooba, @Spacetown
PRs
  • bpo-44817: Ignore WinError 161 (ERROR_BAD_PATHNAME) #27574
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2021-08-03.05:24:11.950>
    labels = ['type-bug', '3.9', '3.10', '3.11', 'library', 'OS-windows']
    title = 'os.path.realpath fails with WinError 161'
    updated_at = <Date 2021-08-05.07:29:35.809>
    user = 'https://github.com/Spacetown'

    bugs.python.org fields:

    activity = <Date 2021-08-05.07:29:35.809>
    actor = 'Spacetown'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)', 'Windows']
    creation = <Date 2021-08-03.05:24:11.950>
    creator = 'Spacetown'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 44817
    keywords = ['patch']
    message_count = 5.0
    messages = ['398814', '398835', '398931', '398956', '398972']
    nosy_count = 6.0
    nosy_names = ['paul.moore', 'tim.golden', 'zach.ware', 'eryksun', 'steve.dower', 'Spacetown']
    pr_nums = ['27574']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue44817'
    versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

    Activity

    Next
    1. Spacetown commented on Aug 3, 2021

      @Spacetown
      Spacetownmannequin
      on Aug 3, 2021
      MannequinAuthor
      More actions

      Using os.path.realpath(...) in the MVFS of Clearcase SCM (virtual file system) in Windows 10 a exception occures:

      X:\my_view\tools\python\3_8>python.exe
      Python 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)] on win32
      Type "help", "copyright", "credits" or "license" for more information.
      >>> import os
      >>> os.path.realpath('.')
      Traceback (most recent call last):
        File "X:\my_view\tools\python\3_8\lib\ntpath.py", line 647, in realpath
          path = _getfinalpathname(path)
      OSError: [WinError 87] Falscher Parameter: 'X:\\my_view\\tools\\python\\3_8\\.'
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "<stdin>", line 1, in <module>
        File "X:\my_view\tools\python\3_8\lib\ntpath.py", line 651, in realpath
          path = _getfinalpathname_nonstrict(path)
        File "X:\my_view\tools\python\3_8\lib\ntpath.py", line 601, in _getfinalpathname_nonstrict
          path = _getfinalpathname(path)
      FileNotFoundError: [WinError 161] Der angegebene Pfadname ist ungültig: 'X:\\'
      >>> 

      The error 161 (ERROR_BAD_PATHNAME) should also be ignored in _getfinalpathname_nonstrict.

    2. Spacetown
      added
      3.8 (EOL)end of lifeend of life
      stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
      on Aug 3, 2021
    3. eryksun
      added
      OS-windows
      3.9 (EOL)end of lifeend of life
      3.10 (EOL)end of lifeend of life
      3.11only security fixesonly security fixes
      type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
      and removed
      3.8 (EOL)end of lifeend of life
      on Aug 3, 2021
    4. 5 remaining items

    5. Spacetown commented on Aug 5, 2021

      @Spacetown
      Spacetownmannequin
      on Aug 5, 2021
      MannequinAuthor
      More actions

      Done.

    6. ezio-melotti
      transferred this issue fromon Apr 10, 2022
    7. serhiy-storchaka
      added
      3.13only security fixesonly security fixes
      3.14bugs and security fixesbugs and security fixes
      3.15bugs and security fixesbugs and security fixes
      and removed
      3.11only security fixesonly security fixes
      3.10 (EOL)end of lifeend of life
      3.9 (EOL)end of lifeend of life
      on May 19, 2025
    8. serhiy-storchaka
      closed this as completedon May 19, 2025
    9. serhiy-storchaka
      added
      3.11only security fixesonly security fixes
      3.10 (EOL)end of lifeend of life
      3.12only security fixesonly security fixes
      and removed
      3.13only security fixesonly security fixes
      3.14bugs and security fixesbugs and security fixes
      3.15bugs and security fixesbugs and security fixes
      on May 19, 2025
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.10 (EOL)end of lifeend of life3.11only security fixesonly security fixes3.12only security fixesonly security fixesOS-windowsstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions

        You are visitor 01402503 — GeezerVison does not store the pages you look up.
        Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.