以下のコードを使用して Sublime Text に Package Control をインストールすると、URL エラーが発生しました
コンソルド コード
import urllib.request,os,hashlib; h = '2915d1851351e5ee549c20394736b442' + '8bc59f460fa1548d1514676163dafc88'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)
エラー
>> import urllib.request,os,hashlib; h = '2915d1851351e5ee549c20394736b442' + '8bc59f460fa1548d1514676163dafc88'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)
Traceback (most recent call last):
File "./urllib/request.py", line 1248, in do_open
File "./http/client.py", line 1065, in request
File "./http/client.py", line 1103, in _send_request
File "./http/client.py", line 1061, in endheaders
File "./http/client.py", line 906, in _send_output
File "./http/client.py", line 844, in send
File "./http/client.py", line 822, in connect
File "./socket.py", line 435, in create_connection
File "./socket.py", line 426, in create_connection
TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "./urllib/request.py", line 156, in urlopen
File "./urllib/request.py", line 469, in open
File "./urllib/request.py", line 487, in _open
File "./urllib/request.py", line 447, in _call_chain
File "./urllib/request.py", line 1268, in http_open
File "./urllib/request.py", line 1251, in do_open
urllib.error.URLError: <urlopen error [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond>
このエラーが発生した後、packageconreol.io Web サイトを確認しました。でも開かなかった。次に、 http://www.websitenotworking.com/を使用して Web サイトのステータスを確認しました。それは返信します、ウェブサイトは機能していません。この段階で、どのようにパッケージ コントロールをインストールしてパッケージをインストールできますか?