E json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) code example

Example: json.decoder.jsondecodeerror: expecting value: line 1 column 1 (char 0)

To summarize the conversation in the comments:

There is no need to use simplejson library, the same library is included with Python as the json module.

There is no need to decode a response from UTF8 to unicode, the simplejson / json .loads() method can handle UTF8 encoded data natively.

pycurl has a very archaic API. Unless you have a specific requirement for using it, there are better choices.

requests offers the most friendly API, including JSON support. If you can, replace your call with:

import requests

return requests.get(url).json()

Tags:

Misc Example