Python 500执行post API时作为响应的错误
字典中没有值的数据成员在实际代码中被外部函数赋值 向上述URL发送请求时,得到500个错误代码作为响应Python 500执行post API时作为响应的错误,python,python-2.7,proxy,python-requests,http-status-code-500,Python,Python 2.7,Proxy,Python Requests,Http Status Code 500,字典中没有值的数据成员在实际代码中被外部函数赋值 向上述URL发送请求时,得到500个错误代码作为响应 os.environ['http_proxy'] = "http://127.0.0.1:8888" os.environ['https_proxy'] = "http://127.0.0.1:8888" headers = { 'Content-Length': "1000",
os.environ['http_proxy'] = "http://127.0.0.1:8888"
os.environ['https_proxy'] = "http://127.0.0.1:8888"
headers = {
'Content-Length': "1000",
'Content-Type': 'application/json',
'User-Agent': "Mozilla/5.0 (Linux; Android 5.1; en-us; A5 Build/LMY47I) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750 Mobile Safari/537.36",
'Host': 't.appsflyer.com',
'Connection': 'Keep-Alive',
'Accept-Encoding': 'gzip'
}
params = {
'buildnumber':"3.7",
'app_id' : 'kr.co.company.hwahae'
}
data = {
'device': None,
'firstLaunchDate': "2018-05-11_1726+0530",
'installDate': "2018-05-11_1652+0530",
'sdk': None,
'referrer': "utm_source=(not%20set)&utm_medium=(not%20set)",
'carrier': None,
'deviceFingerPrintId': "ffffffff-c43e-0f72-0000-0000554b5f2f",
'date1': "2018-05-11_1652+0530",
'af_preinstalled': "false",
'advertiserIdEnabled': "true",
'iaecounter': "0",
'lang_code': "en",
'appsflyerKey': "vyrpAMjHsud67YVPR5ZK4S",
'installer_package': "com.android.vending",
'app_version_name': "3.11.2",
'lang': "English",
'timepassedsincelastlaunch': "23",
'dkh': "vyrpAMjH",
'advertiserId': "3487698f-5e5b-447a-b79f-77bebd0be996",
'isGaidWithGps': "true",
'deviceType': None,
'af_v': None,
'app_version_code': "120",
'af_events_api': "1",
'platformextension': "android_native",
'network': None,
'operator': "",
'country': None,
'date2': "2018-05-11_1652+0530",
'brand': None,
'af_timestamp': "1526039807811",
'uid': "1526037747370-5406320771079142546",
'isFirstCall': "false",
'counter': "2",
'model': None,
'product': None
}
url = 'https://t.appsflyer.com/api/v4/androidevent'
requests.post(url, data = params, headers = headers, proxies = os.environ)
我是python的新手,如有任何帮助,将不胜感激
提前感谢您需要检查服务器日志以了解错误背后的真正原因。这可能是任何东西,是你的代理URL触发了这500个错误吗?否则,请检查API提供程序