0
I’m generating reports with reportlab
But when there are words accentuated, I’m taking 500
Internal Server Error
in the Heroku.
Localhost works just fine. I tried the next one didn’t work out
reports.py
# -*- coding: utf-8 -*-
LOG HEROKU ERROR
[ERROR] Error handling request /laudo/16/paciente/5/imprimir/
Traceback (most recent call last):
File "/app/.heroku/python/lib/python3.5/site-packages/gunicorn/workers/sync.py", line 135, in handle
self.handle_request(listener, req, client, addr)
File "/app/.heroku/python/lib/python3.5/site-packages/gunicorn/workers/sync.py", line 182, in handle_request
resp.write(item)
File "/app/.heroku/python/lib/python3.5/site-packages/gunicorn/http/wsgi.py", line 342, in write
self.send_headers()
File "/app/.heroku/python/lib/python3.5/site-packages/gunicorn/http/wsgi.py", line 338, in send_headers
util.write(self.sock, util.to_bytestring(header_str, "ascii"))
File "/app/.heroku/python/lib/python3.5/site-packages/gunicorn/util.py", line 511, in to_bytestring
return value.encode(encoding)
UnicodeEncodeError: 'ascii' codec can't encode character '\xf3' in position 220: ordinal not in range(128)
Django 1.10+
Python 3.5.1