安装pytest-allure-adaptor后,运行报错:AttributeError: module 'pytest' has no attribute 'allure'

原因:因为pytest-allure-adaptor库基本被python3放弃了,运行很不友好,反正我运行就是报错

解决方法:

先卸载:pip uninstall pytest-allure-adaptor

再安装:pip allure-pytest

然后再去对应case的文件夹下面cmd里面运行: pytest -s -q --alluredir  report  (可以改为你想设的路径,如果是report默认当前目录下),就会生成report文件夹了

安装pytest-allure-adaptor后,运行报错:AttributeError: module 'pytest' has no attribute 'allure'

原文地址:https://www.cnblogs.com/mo-nian/p/12419481.html

时间: 2024-08-05 12:01:42

安装pytest-allure-adaptor后,运行报错:AttributeError: module 'pytest' has no attribute 'allure'的相关文章

python jieba 结巴分词报错 AttributeError: 'module' object has no attribute 'cut'

首先这个AttributeError: ‘module’ object has no attribute ‘cut’ 报错的原因是因为有jieba.py这个文件存在,或者jieba这样命名的文件存在,很多新人使用结巴 来分词的时候命名直接为jieba.py,但是其实官方给的教程代码里有import jieba,这样就会引用到你自己这个教程文件jieba.py,而没有引用官方的库,这样自然cut这个方法就没有,所以报错.解决方法:1.不要使用jieba.py来命名你的测试文件.2.你一开始就是用j

python中引入包的时候报错AttributeError: module 'sys' has no attribute 'setdefaultencoding'解决方法?

python中引入包的时候报错:import unittestimport smtplibimport timeimport osimport sysimp.reload(sys)sys.setdefaultencoding('utf-8') AttributeError: module 'sys' has no attribute 'setdefaultencoding'解决方法: 1.python2中解决方法:reload(sys)sys.setdefaultencoding('utf-8'

Python报错“AttributeError: module 'sys' has no attribute 'setdefaultencoding'问题”

Python3中写法: import imp import sys imp.reload(sys) Python2中写法: import sys reload(sys) sys.setdefaultencoding("utf-8") Python报错"AttributeError: module 'sys' has no attribute 'setdefaultencoding'问题" 原文地址:https://www.cnblogs.com/yznmj-112/

Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法

最近在编写Python脚本过程中遇到一个问题比较奇怪:Python脚本完全正常没问题,但执行总报错"AttributeError: 'module' object has no attribute 'xxx'".这其实是.pyc文件存在问题. 问题定位: 查看import库的源文件,发现源文件存在且没有错误,同时存在源文件的.pyc文件 问题解决方法: 1. 命名py脚本时,不要与python预留字,模块名等相同 2. 删除该库的.pyc文件(因为py脚本每次运行时均会生成.pyc文件

Python首次安装后运行报错(0xc000007b)的解决方法

最近在安装完Python后运行发现居然报错了,错误代码是0xc000007b,于是通过往上查找发现是因为首次安装Python缺乏VC++库的原因,下面通过这篇文章看看如何解决这个问题吧. 错误提示如下: 其实这是一个挺常见的系统报错,缺乏VC++库. 我安装的是python3.5.2,这个版本需要的vc版本是2015的了,下载:Microsoft Visual C++ 2015 update 3 安装完后发现就正常了: 总结 通过以上的方法就能轻松解决首次安装Python后运行报错的问题,希望本

Python 报错 AttributeError: module 'django.db.models' has no attribute 'SubfieldBase'

AttributeError: module 'django.db.models' has no attribute 'SubfieldBase' http://www.guanggua.com/question/35166085-How-to-deal-with-SubfieldBase-has-been-deprecated-Use-Fieldfrom_db_value-instead.html 说的很详细,后期会整理 Python 报错 AttributeError: module 'dj

python-pip升级报错- AttributeError: 'NoneType' object has no attribute 'bytes'

正常的pip升级命令: python -m pip install --upgrade pip 在pytharm里面创建了一个Python项目,pytharm会自动搭建一个新的Python环境,在当前的目录下使用 python -m pip install --upgrade pip 会报错 AttributeError: 'NoneType' object has no attribute 'bytes' 可以使用如下方式 easy_install -U pip python-pip升级报错-

idea生成单元测试后运行报错:java.net.ConnectException: Connection refused:

从官网下载了一个最新的idea(2017.1.4 community),多一个一个类写了一个单元测试,测试代码都没写,然后运行测试,竟然报错,报错为Error connecting to 127.0.0.1:54305; reason: Connection refused: no further information: /127.0.0.1:54305 不知道链接54305端口是干什么的.有没有谁遇到过. 完整错误 : Error:Abnormal build process termina

iReport-3.7.4安装后运行报错 cannot find java.exe

解决方法:到 ireport 安装的目录下找到 etc 目录下的 ireport.conf 文件 将 jdkhome 前面的"#"去掉 ,路径改为自己本机的 JAVA_HOME 路径 eg. jdkhome="C:\Program Files\Java\jdk1.6.0_45"

安装react后运行报错

错误提示:npm WARN checkPermissions Missing write access to C:\Users\LXD\Desktop\webpack-base\node_modules...... 解决方法:删除node_modules文件夹,在项目目录命令行运行npm i,重新生成node_modules,问题解决 问题总结:很多时候在npm中的一些奇奇怪怪的错误,都可以先尝试一下删除node_modules文件夹,重新安装模块看看能不能解决 原文地址:https://www