You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to work with the clientlogin method and using the default example from the documentation the user may encounter an issue where the response.json() produces json encoding error in the runtime. For example a common error would be:
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Expected behavior
Received the response that is documented in the docs:
mediawiki-api-demos/apps/client-login/clientlogin.py
Line 53 in 9a5ac61
Bug
When trying to work with the
clientlogin
method and using the default example from the documentation the user may encounter an issue where theresponse.json()
producesjson
encoding error in the runtime. For example a common error would be:simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Expected behavior
Received the response that is documented in the docs:
Workaround
I'd suggest parsing the response using:
data = json.loads(response.content)
instead of:
data = response.json()
The text was updated successfully, but these errors were encountered: