源代码: #!usr/bin/python3 # -*- coding:utf-8 -*- # @Time: 2018/12/17 下午2:07 # @File: do_excel.py # @Software: PyCharm import unittest from api_auto.common.do_excel import DoExcel from api_auto.common.do_excel import project_path from api_auto.common.req…
import unittest import ddt #装饰器 from ddt import ddt,data,unpack #导入ddt中的各个模块 from homework.unittest_http_request_20190321.Method_http_request import * @ddt #装饰测试类 class TestHttpRq(unittest.TestCase): #测试类-get请求 @data({"}, {","pwd":&quo…
报错场景 执行   celery worker -A tasks -l INFO  打开 worker 的时候报错无法进行 报错解决 Celery 的版本过高, 进行降级处理即可 pip install celery==3.1.25 降级后再次执行会触发 另一报错 此报错原因是 redis 的版本过高导致 对 redis 进行降级即可  pip install redis==2.10.6…
作为才开始学爬虫的萌新,遇到了一个这样的错,很懵逼 后面到网络到处查看大佬的解决方法,才发现headers的请求头部信息有错误,headers是一个字典,不是字符串,所以报错了 原代码 headers={ #假装自己是浏览器 'User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.72 Safari/537.36' } 修改后的代码 head…
有时候用到这个模块的时候会报错 AttributeError: 'CNAME' object has no attribute 'address' 如下所示 [root@ansible ch01]# ./dnspython_ex1.py Please input a domain: www.baidu.com Traceback (most recent call last): File "./dnspython_ex1.py", line 9, in <module> p…
问题:定位不到元素,但却不报错或者出现报错AttributeError: 'list' object has no attribute 'click' 如图  或者  解决方法:   将”driver.find_elements_by_xpath“改为“driver.find_element_by_xpath”即可解决.…
点击"Unittest for test_post_API.testClass"按钮,点击”Edit configuration...“,弹出对话框Run/Debug configurations. 点左侧绿色“+”,选择python tests,选择unittests. 右侧选择configuration标签,Target选择Python,输入“py文件名.文件中定义的类名”例如test_post_API.testClass. 据本人以为,提示“AttributeError: typ…
AttributeError type object 'deprecated' has no attribute 'ROCKY' 在使用kolla安装docker的时候遇到了AttributeError type object 'deprecated' has no attribute 'ROCKY' google得知是osol.log版本的问题 但是在安装的时候,宿主机的环境和kolla,kolla-ansile的oslo的版本都是3.42而keystone的版本是3.36需要大于3.38(这…
python中的文件都会生成pyc文件,包括模块也是这样,所以调用模块的时候,实际上会调用模块.pyc文件:在这个前提下,如果将文件名命名成跟模块名一样,在同一目录下就会生成一个跟模块名一样的pyc文件,系统就直接调用这个文件了,所以就会出现模块中属性错误,如AttributeError: 'module' object has no attribute 'Differ'…
错误:Rasa init --no-prompt 报错 原因:Python升级到3.7后会遇到该问题 解决:pip uninstall typing…