Inside a Twisted Resource, I am returning a json encoded dict as the response var below. The data is a list of 5 people with name, guid, and a couple other fields less than 32 characters long each, so not a ton of data.
I get this OverflowError exception pretty often, but I don't quite understand what the unsupported utf-8 sequence length refers to.
self.request.write(ujson.dumps(response))
exceptions.OverflowError: Unsupported UTF-8 sequence length when encoding string
response
content and try tobase64.urlsafe_b64encode
the bytes string you have in it. – Indecorumuuid.uuid4()
, but should have madestr(uuid.uuid4())
– Kensell