python requests 访问接口 报错 [Errno -2] Name or service not known
迷茫
迷茫 2017-04-18 10:34:53
0
0
1456

1.有几个公开的api接口,我是通过requests 访问的频率比较大,因为需要监控状态。而且还是多进程。就会报这个错误


Vm operation - HTTPConnectionPool(host='*', port=80): Max retries exceeded with url: /gic/v1/task_status/?task_id= (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f5e7fb2f410>: Failed to establish a new connection: [Errno -2] Name or service not known',))


查了一些,说在头部信息中加入关闭连接。等等 一有没有好的解决方法!

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

répondre à tous(0)
Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal
À propos de nous Clause de non-responsabilité Sitemap
Site Web PHP chinois:Formation PHP en ligne sur le bien-être public,Aidez les apprenants PHP à grandir rapidement!