Sometimes you can have this error because your string values are not well recognized by python. As an example: I've spent quite a lot of time searching for the origin of this kind of error. Here is what I found.
Sometimes a language recognizes a kind of quotes and not another one:
btw, to parse a string in to json in JavaScript all quotes have to be in the ' format
to parse a string into json in JavaScript all quotes have to be in the " format which is not really logic.
Hopefully you can use the replace function. For Python:
json.loads(s.replace("\'", '"'));
Hope it will save you the time I've spent hunting this bug!