GET メソッドを使用して M2Crypto HTTPSConnection ライブラリを使用して API に接続しようとすると、次のエラーが発生します。
Traceback (most recent call last):
File "osg-gridadmin-cert-request", line 665, in <module>
status = check_quota_limit(request_count)
File "osg-gridadmin-cert-request", line 543, in check_quota_limit
conn.request('GET', arguments['quotaurl'], headers)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 941, in request
self._send_request(method, url, body, headers)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 975, in _send_request
self.endheaders(body)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 937, in endheaders
self._send_output(message_body)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 801, in _send_output
self.send(message_body)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 773, in send
self.sock.sendall(data)
File "build/bdist.macosx-10.7-intel/egg/M2Crypto/SSL/Connection.py", line 217, in write
return self._write_nbio(data)
File "build/bdist.macosx-10.7-intel/egg/M2Crypto/SSL/Connection.py", line 202, in _write_nbio
return m2.ssl_write_nbio(self.ssl, data)
TypeError: expected a readable buffer object
このコードを使用して API にアクセスしています
conn = M2Crypto.httpslib.HTTPSConnection(arguments['host'],
ssl_context=ssl_context)
conn.request('GET', arguments['quotaurl'], headers)
response = conn.getresponse()
この問題について教えてください。