Skip to content

test_urllib2.test_trivial fails when run from another Windows drive #47952

Closed

Description

@pitrou
BPO 3702
Nosy @orsenthil, @pitrou, @iritkatriel
Superseder
  • bpo-7648: test_urllib2 fails on Windows if not run from C:
  • 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 = <Date 2021-05-28.11:55:41.498>
    created_at = <Date 2008-08-27.14:01:42.278>
    labels = ['tests', 'type-bug', 'library']
    title = 'test_urllib2.test_trivial fails when run from another Windows drive'
    updated_at = <Date 2021-05-28.11:55:41.497>
    user = 'https://github.com/pitrou'

    bugs.python.org fields:

    activity = <Date 2021-05-28.11:55:41.497>
    actor = 'iritkatriel'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-05-28.11:55:41.498>
    closer = 'iritkatriel'
    components = ['Library (Lib)', 'Tests']
    creation = <Date 2008-08-27.14:01:42.278>
    creator = 'pitrou'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 3702
    keywords = []
    message_count = 4.0
    messages = ['72031', '72032', '221867', '394651']
    nosy_count = 3.0
    nosy_names = ['orsenthil', 'pitrou', 'iritkatriel']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '7648'
    type = 'behavior'
    url = 'https://bugs.python.org/issue3702'
    versions = ['Python 2.7']

    Activity

    1. pitrou commented on Aug 27, 2008

      @pitrou
      MemberAuthor

      ======================================================================
      ERROR: test_trivial (test.test_urllib2.TrivialTests)
      ----------------------------------------------------------------------

      Traceback (most recent call last):
        File "Z:\py3k\__svn__\lib\urllib\request.py", line 1199, in
      open_local_file
          stats = os.stat(localfile)
      WindowsError: [Error 3] Le chemin d'accès spécifié est introuvable:
      '\\py3k\\__s
      vn__\\lib\\urllib\\request.py'
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "Z:\py3k\__svn__\lib\test\test_urllib2.py", line 32, in test_trivial
          f = urllib.request.urlopen(file_url)
        File "Z:\py3k\__svn__\lib\urllib\request.py", line 122, in urlopen
          return _opener.open(url, data, timeout)
        File "Z:\py3k\__svn__\lib\urllib\request.py", line 359, in open
          response = self._open(req, data)
        File "Z:\py3k\__svn__\lib\urllib\request.py", line 377, in _open
          '_open', req)
        File "Z:\py3k\__svn__\lib\urllib\request.py", line 337, in _call_chain
          result = func(*args)
        File "Z:\py3k\__svn__\lib\urllib\request.py", line 1178, in file_open
          return self.open_local_file(req)
        File "Z:\py3k\__svn__\lib\urllib\request.py", line 1213, in
      open_local_file
          raise URLError(msg)
      urllib.error.URLError: <urlopen error [Error 3] Le chemin d'accès
      spécifié est i
      ntrouvable: '\\py3k\\__svn__\\lib\\urllib\\request.py'>

    2. added
      stdlibStandard Library Python modules in the Lib/ directory
      testsTests in the Lib/test dir
      type-bugAn unexpected behavior, bug, or error
      on Aug 27, 2008
    3. pitrou commented on Aug 27, 2008

      @pitrou
      MemberAuthor

      What I forgot to say is that the test was launched from the C: drive:

      C:\>z:PCbuild\python_d.exe z:Lib\test\regrtest.py -uall -v test_urllib2

    4. BreamoreBoy commented on Jun 29, 2014

      BreamoreBoymannequin
      Mannequin

      I no longer have a 2.7 setup so can someone else try to reproduce this problem.

    5. iritkatriel commented on May 28, 2021

      @iritkatriel
      Member

      This was fixed under bpo-7648.

    6. transferred this issue fromon Apr 10, 2022
    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

      stdlibStandard Library Python modules in the Lib/ directorytestsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions