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.

classification
Title: test_urllib2.test_trivial fails when run from another Windows drive
Type: behavior Stage: resolved
Components: Library (Lib), Tests Versions: Python 2.7
process
Status: closed Resolution: duplicate
Dependencies: Superseder: test_urllib2 fails on Windows if not run from C:
View: 7648
Assigned To: Nosy List: iritkatriel, orsenthil, pitrou
Priority: normal Keywords:

Created on 2008-08-27 14:01 by pitrou, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (4)
msg72031 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2008-08-27 14:01
======================================================================
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'>

----------------------------------------------------------------------
msg72032 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2008-08-27 14:04
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
msg221867 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-06-29 17:54
I no longer have a 2.7 setup so can someone else try to reproduce this problem.
msg394651 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2021-05-28 11:55
This was fixed under issue7648.
History
Date User Action Args
2022-04-11 14:56:38adminsetgithub: 47952
2021-05-28 11:55:41iritkatrielsetstatus: open -> closed

superseder: test_urllib2 fails on Windows if not run from C:

nosy: + iritkatriel
messages: + msg394651
resolution: duplicate
stage: test needed -> resolved
2019-03-16 00:06:22BreamoreBoysetnosy: - BreamoreBoy
2014-06-29 17:54:15BreamoreBoysetnosy: + BreamoreBoy

messages: + msg221867
versions: + Python 2.7, - Python 3.2, Python 3.3
2012-10-02 05:56:47ezio.melottisetversions: + Python 3.2, Python 3.3, - Python 3.0
2009-02-12 17:58:34ajaksu2setnosy: + orsenthil
stage: test needed
2008-08-27 14:04:13pitrousetmessages: + msg72032
2008-08-27 14:01:42pitroucreate