Hi all!
I get the following error on oTree HR when entering the session code to use it with Prolific. I created a room and using this room's session with the right code. Can you help me?
Best regards,
Stephane
Traceback (most recent call last):
File "/app/.heroku/python/lib/python3.9/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
During handling of the above exception (2), another exception occurred:
File "/app/.heroku/python/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/app/.heroku/python/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/app/.heroku/python/lib/python3.9/site-packages/sentry_sdk/integrations/django/views.py", line 67, in sentry_wrapped_callback
return callback(request, *args, **kwargs)
File "/app/.heroku/python/lib/python3.9/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/app/.heroku/python/lib/python3.9/site-packages/django/views/generic/base.py", line 70, in view
return self.dispatch(request, *args, **kwargs)
File "/app/hr/views.py", line 17, in dispatch
return super().dispatch(request, *args, **kwargs)
File "/app/.heroku/python/lib/python3.9/site-packages/django/views/generic/base.py", line 98, in dispatch
return handler(request, *args, **kwargs)
File "/app/prolific/views.py", line 50, in post
session_data = site.call_api(GET, 'sessions', code, participant_labels=[])
File "/app/hr/models.py", line 78, in call_api
return call_api(self.url, self.rest_key, method, *path_parts, **params)
File "/app/otree_api.py", line 46, in call_api
return resp.json()
File "/app/.heroku/python/lib/python3.9/site-packages/requests/models.py", line 900, in json
return complexjson.loads(self.text, **kwargs)
File "/app/.heroku/python/lib/python3.9/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/app/.heroku/python/lib/python3.9/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/app/.heroku/python/lib/python3.9/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
Exception Type: JSONDecodeError at /sites/14/prolific
Exception Value: Expecting value: line 3 column 1 (char 2)