私はpythonでカールリクエストを実行しようとしています。私のコードは次のとおりです:pythonでカールリクエストを実行
TypeError: expected string or buffer (payload = json.loads(open("request.json")))
このエラーが何であるか任意のアイデア:私は2行目に、次のエラーが発生しますHowver
url = 'http://xx.xxx.xx.xxx:xxxx/api/common/learningSessions/588752bef1d4654173a43015'
payload = json.loads(open("request.json"))
headers = {'X-User-Path': '....', 'X-User-Token': '...')
r = requests.get(url, data=json.dumps(payload), headers=headers)
?
しかし、私のjsonは検証されています。 – christosh