Commit 9e008873 authored by lcn's avatar lcn

bug修复

parent e9a86df4
import json
import logging
import math
from pot_libs.qingstor_util.qs_client import QsClient
from unify_api.utils import time_format
......@@ -86,6 +87,9 @@ async def scope_analyse_service(pid, create_time):
try:
async with QsClient() as qs:
context = await qs.get_object(data["url"])
for k, v in context.items():
context[k] = [value if not math.isnan(value) else '' for value
in v]
except Exception as e:
log.error(f"录波地址无效 url:{data['url']} message:{str(e)}")
return success_res(code=RET.not_data, msg="录波地址有误")
......@@ -122,9 +126,12 @@ async def scope_analyse_service(pid, create_time):
reason=reason,
contents=context)
else:
ctnum = 2 if "uab" in context else 3
result = actionFile(context, ctnum)
log.info(f"actionFile 波形分析 结论 result:{result}")
try:
ctnum = 2 if "uab" in context else 3
result = actionFile(context, ctnum)
log.info(f"actionFile 波形分析 结论 result:{result}")
except:
result = None
fina_reason = []
if isinstance(result, list):
record_type_name, probability, reason = result[0]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment