开发者社区> 问答> 正文

Python 人脸识别 CV2 detectMultiScale 函数,本机不报错,云服务器报错。

stevenlu 2018-05-07 14:46:19 1463

本机环境Windows 10, Python 3.5.1
ECS环境Windows Server 2012 R2, Python 3.5.1

laptop_success
aliyun_fail

跟踪发现是这句话在云服务器上导致运行错误:

    rects = detector.detectMultiScale(image_gray, scaleFactor=1.1, minNeighbors=5, 
        minSize=(30, 30), flags=cv2.CASCADE_SCALE_IMAGE)

错误如下:

·During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "test_api.py", line 11, in
r = requests.post(url, data=payload).json()
File "C:UsersAdministratorDownloadsPython35libsite-packagesrequestsapi.py", line 112, in post
return request('post', url, data=data, json=json, **kwargs)
File "C:UsersAdministratorDownloadsPython35libsite-packagesrequestsapi.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "C:UsersAdministratorDownloadsPython35libsite-packagesrequestssessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "C:UsersAdministratorDownloadsPython35libsite-packagesrequestssessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "C:UsersAdministratorDownloadsPython35libsite-packagesrequestsadapters.py", line 490, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None))·

JSON 弹性计算 数据格式 计算机视觉 Python Windows
分享到
取消 提交回答
全部回答(0)

集结各类场景实战经验,助你开发运维畅行无忧

推荐文章
相似问题