exceptions.TypeError an integer is required

jakecjacobson jakecjacobson at gmail.com
Fri Jul 24 14:24:58 EDT 2009

I am trying to do a post to a REST API over HTTPS and requires the
script to pass a cert to the server.  I am getting
"exceptions.TypeError an integer is required" error and can't find the
reason.  I commenting out the lines of code, it is happening on the
connection.request() line.  Here is the problem code.  Would love some
help if possible.

	head = {"Content-Type" : "application/x-www-form-urlencoded",
"Accept" : "text/plain"}
	parameters = urlencode({"collection" : collection, "entryxml" : open
		connection = httplib.HTTPSConnection(host, port, key_file,
		connection.request('POST', path, parameters, head)
		response = connection.getresponse()
		print response.status, response.reason
		print sys.exc_type, sys.exc_value


More information about the Python-list mailing list