I found this error when I had a container name that had unicode text. We should also check for objects with unicde names as well.
Example traceback:
Jan 17 23:01:10 storage1 proxy-server Error: You cannot set Response.body to a unicode object (use Response.unicode_body): #012Traceback (most recent call last):#012 File "/home/cthier/swift/devauth-fix-id-2/swift/common/middleware/catch_errors.py", line 37, in __call__#012 return self.app(env, start_response)#012 File "/home/cthier/swift/devauth-fix-id-2/swift/common/middleware/healthcheck.py", line 38, in __call__#012 return self.app(env, start_response)#012 File "/home/cthier/swift/devauth-fix-id-2/swift/common/middleware/memcache.py", line 32, in __call__#012 return self.app(env, start_response)#012 File "/home/cthier/swift/devauth-fix-id-2/swift/common/middleware/swift3.py", line 425, in __call__#012 res = getattr(controller, req.method)(env, start_response)#012 File "/home/cthier/swift/devauth-fix-id-2/swift/common/middleware/swift3.py", line 153, in GET#012 xml_escape(i['name']) for i in containers]))#012 File "/usr/local/lib/python2.6/dist-packages/WebOb-1.0-py2.6.egg/webob/response.py", line 309, in _body__set#012 "You cannot set Response.body to a unicode object (use Response.unicode_body)")#012TypeError: You cannot set Response.body to a unicode object (use Response.unicode_body) (txn: txa6661713-cc10-4cab-8143-ec0b03a52b0b)
Seems that I can list the unicode name buckets and objects with this fix.
https:/ /code.launchpad .net/~fujita- tomonori/ swift/s3api- unicode- fix-1