1

I have already tried everything suggested at uWSGI / Emperor: UnicodeEncodeError: 'ascii' codec can't encode character but nothing worked.

here is my ini file

[uwsgi]
# -------------
# Settings:
# key = value
# Comments >> #
# -------------

env LANG=en_US.utf8
env LC_ALL=en_US.UTF-8
env LC_LANG=en_US.UTF-8
env = PYTHONIOENCODING=UTF-8

# socket = [addr:port]
http = 127.0.0.1:8000


# WSGI module and callable
# module = [wsgi_module_name]:[application_callable_name]
module = church.wsgi

# master = [master process (true of false)]
master = true

static-map = /static=/home/....church/static 

# processes = [number of processes]
processes = 5


..

Basically I have a simple django app fetching stocks names with unicode characters like öé etc. the Django development server works find and return no error. In production it returns

"  'ascii' codec can't encode character '\xe9' in position 7: ordinal not in range(128)"

so parsing fails and date is not added to the db.

devnull
  • 2,752
  • 1
  • 21
  • 38
  • always put full error message (starting at word "Traceback") in question (not comment) as text (not screenshot). There are other useful information. – furas Jan 03 '20 at 17:45
  • @furas excuse my ignorance but this is the full error I receive from uwsgi. How do I get the traceback ? – devnull Jan 03 '20 at 19:09
  • 1
    @furas just as a P.S. if you think that my question is not complete there is need to follow all my posts to comment. I am confident that this is the only error that uwsgi gives me -- which is clearly because is buggy in year 2020 utf encoding should be a given not something to debug - Gunicorn works fine out of the box. – devnull Jan 03 '20 at 19:48
  • I see so many questions every day so I don't rememer other your questions. – furas Jan 03 '20 at 19:53

0 Answers0