如何从boto中获得有用的诊断信息?我所看到的只是无用的“400坏请求”。我认识到boto只是传递了底层API可用的东西,但肯定有某种方式可以获得比“错误请求”更有用的东西。如何从boto获得有用的诊断信息?
Traceback (most recent call last):
File "./mongo_pulldown.py", line 153, in <module>
main()
File "./mongo_pulldown.py", line 24, in main
print "snap = %r" % snap
File "./mongo_pulldown.py", line 149, in __exit__
self.connection.delete_volume(self.volume.id)
File "/home/roy/deploy/current/python/local/lib/python2.7/site-packages/boto/ec2/connection.py", line 1507, in delete_volume
return self.get_status('DeleteVolume', params, verb='POST')
File "/home/roy/deploy/current/python/local/lib/python2.7/site-packages/boto/connection.py", line 985, in get_status
raise self.ResponseError(response.status, response.reason, body)
boto.exception.EC2ResponseError: EC2ResponseError: 400 Bad Request
'import boto; boto.set_stream_logger('boto')'会打印json结果,包括控制台遇到的任何错误。 – ecoe