开发者社区 问答 正文

通过代理访问人脸识别API,返回报错?

通过行内squid代理服务器访问阿里云人脸识别服务:https://saf.cn-shanghai.aliyuncs.com,偶尔会出现报错,报错内容为:[Request processing failed; nested exception is java.lang.IllegalStateException: Server response has a bad format type: RAW

展开
收起
1688874424187611 2020-06-02 12:47:38 801 分享
分享
版权
举报
1 条回答
写回答
取消 提交回答
  • def ignore_pic(i): data = {'codeType': '1001', 'length': '4', 'appkey': '******************'} url = 'https://way.jd.com/pengyun/seemmark' with open('pic/%s.jpg' % i, 'rb')as f: response = requests.get(url, data, data=f) result = response.text json_data = json.loads(result) print(json_data["result"]["result"]) return json_data["result"]["result"]

    2021-02-22 17:35:27 举报
    赞同 评论

    评论

    全部评论 (0)

    登录后可评论
AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等