私はリクエストを使用して、次のコードで投稿リクエストを送信しています:
EMAIL=test@test.com
payload = {'ref':'EdX7CqkmjCETTSA9MOPvvmmhLE0OH9_D-zjde6lAKsOoKD8','EMAIL':EMAIL,'tag': 'F41D3B010005FB43'}
post_response = requests.post(url='http://p5trc.emv2.com/D2TTF8', params=payload)
次の例外が発生します。
File "C:\Program Files\eclipse\plugins\org.python.pydev_2.7.1.2012100913\pysrc\pydevd.py", line 1090, in run
pydev_imports.execfile(file, globals, locals) #execute the script
File "C:\Users\USER\workspace\POST_ME\POST_ME.py", line 72, in <module>
post_response = requests.post(url='http://p5trc.emv2.com/D2TTF8', params=payload)
File "C:\Users\USER\workspace\POST_ME\requests\api.py", line 98, in post
return request('post', url, data=data, **kwargs)
File "C:\Users\USER\workspace\POST_ME\requests\safe_mode.py", line 39, in wrapped
return function(method, url, **kwargs)
File "C:\Users\USER\workspace\POST_ME\requests\api.py", line 51, in request
return session.request(method=method, url=url, **kwargs)
File "C:\Users\USER\workspace\POST_ME\requests\sessions.py", line 268, in request
r.send(prefetch=prefetch)
File "C:\Users\USER\workspace\POST_ME\requests\models.py", line 650, in send
self._build_response(r)
File "C:\Users\USER\workspace\POST_ME\requests\models.py", line 313, in _build_response
request.send()
File "C:\Users\USER\workspace\POST_ME\requests\models.py", line 636, in send
raise ConnectionError(sockerr)
requests.exceptions.ConnectionError: [Errno 11004] getaddrinfo failed
文字列からマイナス文字をEdX7CqkmjCETTSA9MOPvvmmhLE0OH9_D-zjde6lAKsOoKD8
削除するか'tag': 'F41D3B010005FB43'
、辞書から削除すると、例外は発生しません。
何か案が?