New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test_urllib fails on windows #50111
Comments
Hello. I noticed test_urllib fails on windows. ====================================================================== Traceback (most recent call last):
File "test_urllib.py", line 241, in test_copy
test_support.TESTFN), second_temp)
File "e:\python-dev\trunk\lib\urllib.py", line 94, in urlretrieve
return _urlopener.retrieve(url, filename, reporthook, data)
File "e:\python-dev\trunk\lib\urllib.py", line 238, in retrieve
fp = self.open(url, data)
File "e:\python-dev\trunk\lib\urllib.py", line 206, in open
return getattr(self, name)(url)
File "e:\python-dev\trunk\lib\urllib.py", line 464, in open_file
return self.open_local_file(url)
File "e:\python-dev\trunk\lib\urllib.py", line 478, in open_local_file
raise IOError(e.errno, e.strerror, e.filename)
IOError: [Errno 22] ネットワークに到達できません。ネットワークのトラブル
シューテ
ィングについては、Windows ヘルプを参照してください。:
'\\\\\\E|\\python-dev\\tru
nk\\Lib\\test\\@test' (snip) This happens since r71780. Workaround is to add "|" to safe list of # I don't know "|" is really safe. |
Python 2.7a0 (trunk, Apr 28 2009, 10:23:56) [MSC v.1200 32 bit (Intel)] Type "help", "copyright", "credits" or "license" for more information.
>>> import urllib
>>> urllib.pathname2url("c:/foo")
'///C|//foo' When "|" above is quoted, urllib.urlopen cannot handle quoted url. |
Or another workaround is to change line "path = '///' + drive + '|' " |
I had made that change. tested only linux, where it was all pass. Shall |
Fixed this in the revision: 72343. Agree to the comment on replacing '|' |
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:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: