服务端部署成功,客户端请求出错(树莓派)
Created by: 13433583369
服务器端 : windows10
客户端 : 树莓派4b 32bit armv7
我在windows10上成功部署了 然后我在windows10上,在.py文件中通过客户端请求的方式,得到预测结果(一切正常,客户端请求也正常,返回结果也正常)
datas = {'images':[cv2_to_base64(frame)],"visualization":True,"output_dir":"result"}
headers = {"Content-type": "application/json"}
http://127.0.0.1:8866/predict/pyramidbox_lite_server_mask"
url = "r = requests.post(url=url, headers=headers, data=json.dumps(datas))
但是,当我把同样的.py文件在树莓派上跑的时候,却返回这样的错误 ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=8866): Max retries exceeded with url: /predict/pyramidbox_lite_server_mask (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xa038a4f0>: Failed to establish a new connection: [Errno 111] Connection refused',)) 树莓派连上网了,和windows连的是同一个wifi。
请问这是什么原因呢