Skip to content

Commit

Permalink
Merge pull request #27 from return42/fix-debug-log
Browse files Browse the repository at this point in the history
[fix] debug log: UnicodeEncodeError: 'ascii' codec can't encode
  • Loading branch information
dalf authored Apr 26, 2021
2 parents 5149484 + 1a402be commit 12bdf71
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion searx/webapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def new_thread_init(self, *args, **kwargs):
from timeit import default_timer
from html import escape
from io import StringIO
import urllib
from urllib.parse import urlencode, urlparse

from pygments import highlight
Expand Down Expand Up @@ -246,7 +247,10 @@ def get_locale():
request.form['use-translation'] = 'oc'
locale = 'fr_FR'

logger.debug("%s uses locale `%s` from %s", request.url, locale, locale_source)
logger.debug(
"%s uses locale `%s` from %s", urllib.parse.quote(request.url), locale, locale_source
)

return locale


Expand Down

0 comments on commit 12bdf71

Please sign in to comment.