Django working well but not with Gunicorn, how to debug?
When I run
python manage.py runserver localhost:9000
and visit the website, it works perfectly.
But when I run it on gunicorn, the website still runs. But when I visit a certain page, some part of my code behaved differently, as it ended up with showing a django debug error page.
It has never been like this before, I guess it might be due to some environment variable setting or something, as I am using nltk, stanford parser, which might be the reason causing this.
As shown in the error page, the main error was caused by
Error in formatting: 'ascii' codec can't encode character u'\xe4' in position 23: ordinal not in range(128)
Why would gunicorn cause such a difference?
I am not familiar with django logging, I have always been using console output for debugging, which is stupid. What's the fast way for me to figure out what is going on?
Can I see the console output somewhere, or is there a fast way for logging?