Python は初めてですが、サイトからデータを取得しようとしています:
import urllib.request
response = urllib.request.urlopen("http://www.python.org")
これは、Python 3.1 のドキュメントで見たのと同じコードです。そして、たくさんのサイト。
しかし、私は得る:
Message File Name Line Position
Traceback
<module> G:\My Documents\Python\HTTP.py 14
urlopen E:\Python 3.1\Lib\urllib\request.py 119
open E:\Python 3.1\Lib\urllib\request.py 342
_open E:\Python 3.1\Lib\urllib\request.py 360
_call_chain E:\Python 3.1\Lib\urllib\request.py 320
http_open E:\Python 3.1\Lib\urllib\request.py 1063
do_open E:\Python 3.1\Lib\urllib\request.py 1048
URLError: <urlopen error [Errno 10022] An invalid argument was supplied>
何が原因なのかわかりません。誰でも知っていますか?