我有以下抛出的非常基本的代码; TypeError: the JSON object must be str, not 'bytes'
import requests
import json
url = 'my url'
user = 'my user'
pwd = 'my password'
response = requests.get(url, auth=(user, pwd))
if(myResponse.ok):
Data = json.loads(myResponse.content)
我尝试将解码设置为Data变量,如下所示,但它会引发相同的错误; jData = json.loads(myResponse.content).decode('utf-8')
有什么建议么?