报错信息如下:
aliyunsdkcore.acs_exception.exceptions.ClientException: SDK.HttpError HTTPConnectionPool(host='ocr.cn-hangzhou.aliyuncs.com', port=80): Max retries exceeded with url: /?Version=2019-12-30&Action=RecognizeIdentityCard&Format=JSON&RegionId=cn-hangzhou&Timestamp=2020-11-19T02%3A01%3A23Z&SignatureMethod=HMAC-SHA1&SignatureType=&SignatureVersion=1.0&SignatureNonce=a0c0d03d-a445-5ac1-a533-dcbae07b014c&AccessKeyId=203874928&Signature=7paiLTZlLA2oBEhxa1C%2BfWNosYY%3D (Caused by NewConnectionError('<aliyunsdkcore.vendored.requests.packages.urllib3.connection.HTTPConnection object at 0x0000018BE1D35548>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))
通过这个SDK调用的host是ocr.cn-hangzhou.aliyuncs.com, 而阿里云市场给的调用地址是http(s)://dm-51.data.aliyun.com/rest/160601/ocr/ocr_idcard.json
有没有aliyun-python-sdk-ocr的使用文档,我使用如下的代码,运行报错
报错信息如下: aliyunsdkcore.acs_exception.exceptions.ClientException: SDK.HttpError HTTPConnectionPool(host='ocr.cn-hangzhou.aliyuncs.com', port=80): Max retries exceeded with url: /?Version=2019-12-30&Action=RecognizeIdentityCard&Format=JSON&RegionId=cn-hangzhou&Timestamp=2020-11-19T02%3A01%3A23Z&SignatureMethod=HMAC-SHA1&SignatureType=&SignatureVersion=1.0&SignatureNonce=a0c0d03d-a445-5ac1-a533-dcbae07b014c&AccessKeyId=203874928&Signature=7paiLTZlLA2oBEhxa1C%2BfWNosYY%3D (Caused by NewConnectionError('<aliyunsdkcore.vendored.requests.packages.urllib3.connection.HTTPConnection object at 0x0000018BE1D35548>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')) 通过这个SDK调用的host是ocr.cn-hangzhou.aliyuncs.com, 而阿里云市场给的调用地址是http(s)://dm-51.data.aliyun.com/rest/160601/ocr/ocr_idcard.json