I have the following, very basic code that throws; TypeError: the JSON object must be str, not \'bytes\'
TypeError: the JSON object must be str, not \'bytes\'
import requests import json url = \'my
python3.6+ does this automatically.so your code shouldn't return error in python3.6+
what's new in python3.6