jeffwillette / django-g-recaptcha

installable django app that processes the validation of google recaptcha
5 stars 1 forks source link

Json decoding error in django 2.1.3, python 3.5 #5

Open eloktev opened 5 years ago

eloktev commented 5 years ago

` Traceback:

File "/home/ubuntu/pielinen/pielinen/.venv/lib/python3.5/site-packages/django/core/handlers/exception.py" in inner

  1. response = get_response(request)

File "/home/ubuntu/pielinen/pielinen/.venv/lib/python3.5/site-packages/django/core/handlers/base.py" in _get_response

  1. response = self.process_exception_by_middleware(e, request)

File "/home/ubuntu/pielinen/pielinen/.venv/lib/python3.5/site-packages/django/core/handlers/base.py" in _get_response

  1. response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/home/ubuntu/pielinen/pielinen/.venv/lib/python3.5/site-packages/g_recaptcha/validate_recaptcha.py" in wrap

  1. result = json.loads(response.read())

File "/usr/lib/python3.5/json/init.py" in loads

  1. s.class.name))

Exception Type: TypeError at /ru/contacts/ Exception Value: the JSON object must be str, not 'bytes' `

jeffwillette commented 5 years ago

Hi. Thanks for filing the issue. I have not actually used Django in quite some time and I don't have any example projects setup to try and diagnose this issue.

Can you provide a full reproduction example of the issue?