|
@@ -62,11 +62,14 @@ def send_reqest(url, jata):
|
|
|
for i in range(len(jata)):
|
|
|
res = requests.post(url, headers=headers, data=jata[i])
|
|
|
if res.json()['code'] == '500':
|
|
|
- print("没通过考核标准")
|
|
|
+ print("没通过考核标准", end=' ')
|
|
|
continue
|
|
|
number += 1
|
|
|
acc += float(res.json()['data'][:-1])
|
|
|
- acc /= number
|
|
|
+ if number != 0:
|
|
|
+ acc /= number
|
|
|
+ else:
|
|
|
+ print("无法迭代计算准确率平均值,分母为0")
|
|
|
return acc
|
|
|
|
|
|
|