You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test_urllib2.test_trivial fails when run from another Windows drive #47952
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=Noneclosed_at=<Date2021-05-28.11:55:41.498>created_at=<Date2008-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=<Date2021-05-28.11:55:41.497>user='https://github.com/pitrou'
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 urlopenreturn _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_openreturnself.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'>
Activity
pitrou commentedon Aug 27, 2008
======================================================================
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'>pitrou commentedon Aug 27, 2008
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
BreamoreBoy commentedon Jun 29, 2014
I no longer have a 2.7 setup so can someone else try to reproduce this problem.
iritkatriel commentedon May 28, 2021
This was fixed under bpo-7648.