zoukankan      html  css  js  c++  java
  • 关于python接口测试connect error

    接口测试里如果报错出现

    socket.gaierror: [Errno 8] nodename nor servname provided, or not known

    或者

    urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x107ec2a20>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known

    或者

    raise MaxRetryError(_pool, url, error or ResponseError(cause))
    urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='XXXXX.com', port=443): Max retries exceeded with url: /proapi/user_device (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x107ec2a20>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known',))

    或者

    raise ConnectionError(e, request=request)
    requests.exceptions.ConnectionError: HTTPSConnectionPool(host='XXXXX.com', port=443): Max retries exceeded with url: /proapi/user_device (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x107ec2a20>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known',))

    首先考虑本机网络有问题,测试方法是把host直接复制到浏览器,看能不能打开网页,如果不能打开,那就是网络问题,如果可以打开,再查找其他问题

  • 相关阅读:
    MySQL_创建数据库和表
    MySQL注释的3中方法
    子查询概念和分类
    弱网测试如何进行
    Fiddler_ 移动端抓包配置IOS&Android,Fiddler获取APP端的流量
    Fiddler_HTTPS 如何抓包和浏览器设置
    Fiddler_弱网测试
    Three.js 游戏操作案例
    flex 教程
    JS知识
  • 原文地址:https://www.cnblogs.com/mghhzAnne/p/9199225.html
Copyright © 2011-2022 走看看