I am generating reports with reportlab
But when you have words with an accent, I'm taking 500
Internal Server Error
no Heroku .
Localhost works perfectly. I tried the following did not work
reports.py
# -*- coding: utf-8 -*-
HEROKU LOG 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