安装allure后执行命令后报错module 'pytest' has no attribute 'allure'

C:\Users\Desktop\xin>pytest -s -q --alluredir report
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "c:\python34\lib\site-packages\_pytest\main.py", line 199, in wrap_session
INTERNALERROR> config._do_configure()
INTERNALERROR> File "c:\python34\lib\site-packages\_pytest\config\__init__.py", line 636, in _do_configure
INTERNALERROR> self.hook.pytest_configure.call_historic(kwargs=dict(config=self))
INTERNALERROR> File "c:\python34\lib\site-packages\pluggy\hooks.py", line 306, in call_historic
INTERNALERROR> res = self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR> File "c:\python34\lib\site-packages\pluggy\manager.py", line 68, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR> File "c:\python34\lib\site-packages\pluggy\manager.py", line 62, in <lambda>
INTERNALERROR> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR> File "c:\python34\lib\site-packages\pluggy\callers.py", line 208, in _multicall
INTERNALERROR> return outcome.get_result()
INTERNALERROR> File "c:\python34\lib\site-packages\pluggy\callers.py", line 80, in get_result
INTERNALERROR> raise ex[1].with_traceback(ex[2])
INTERNALERROR> File "c:\python34\lib\site-packages\pluggy\callers.py", line 187, in _multicall
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "c:\python34\lib\site-packages\allure\pytest_plugin.py", line 80, in pytest_configure
INTERNALERROR> pytest.allure._allurelistener = testlistener
INTERNALERROR> AttributeError: 'module' object has no attribute 'allure'

解决

cmd执行如下命令:

pip uninstall pytest-allure-adaptor
pip install allure-pytest

module 'pytest' has no attribute 'allure'问题解决的更多相关文章

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

    ​ 原因:因为pytest-allure-adaptor库基本被python3放弃了,运行很不友好,反正我运行就是报错 解决方法: 先卸载:pip uninstall pytest-allure-ad ...

  2. AttributeError: module 'pytest' has no attribute 'allure'

    解决 pip3 uninstall pytest-allure-adaptor pip3 install allure-pytest 参考: https://www.cnblogs.com/lansa ...

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

    最近在编写Python脚本过程中遇到一个问题比较奇怪:Python脚本完全正常没问题,但执行总报错"AttributeError: 'module' object has no attrib ...

  4. python--DenyHttp项目(1)--GUI:tkinter☞ module 'tkinter' has no attribute 'messagebox'

    AttributeError: module 'tkinter' has no attribute 'messagebox' improt tkinter from tkinter import * ...

  5. 【问题解决方案】AttributeError: module 'pygal' has no attribute 'Worldmap'

    <Python编程:从入门到实践>- 16章-16.2.5制作世界地图 import pygal 后报如标题的error 参考CSDN 解决:AttributeError: module ...

  6. python 脚本运行时报错: AttributeError: 'module' object has no attribute ***

    最近在编写Python脚本过程中遇到一个问题比较奇怪:Python脚本完全正常没问题,但执行总报错"AttributeError: 'module' object has no attrib ...

  7. 【Python 数据分析】module 'numpy' has no attribute 'array'

    安装好Numpy模块后,开始做了几个小测试都可以运行,但是当我创建numpy.py这个文件后 numpy.py import numpy y = numpy.array([[11,4,2],[2,6, ...

  8. (转)AttributeError: module 'tkinter' has no attribute 'messagebox'

    AttributeError: module 'tkinter' has no attribute 'messagebox' improt tkinter from tkinter import * ...

  9. unittest模块在linux报错: AttributeError: module 'unittest' has no attribute 'TestRunner'

    一开始在windows下运行没有问题,但是在linux下运行却报如下错误: ​ AttributeError: module 'unittest' has no attribute 'TestRunn ...

随机推荐

  1. 【Python】Python处理csv文件

    Python处理csv文件 CSV(Comma-Separated Values)即逗号分隔值,可以用Excel打开查看.由于是纯文本,任何编辑器也都可打开.与Excel文件不同,CSV文件中: 值没 ...

  2. CF44H Phone Number

    题意翻译 给你一个电话号码,根据这个号码生成一个新的号码.生成的规则就是 新号码的第一个数任意选(0-9), 然后之后的每一个新号码都按照以下规则生成: 第i个新号码=(第i-1个新号码+第i个老号码 ...

  3. MySQL主键和外键使用及说明

    摘自网上一个经典的例子:大哥和小弟 一.外键约束 MySQL通过外键约束来保证表与表之间的数据的完整性和准确性. 外键的使用条件:  1.两个表必须是InnoDB表,MyISAM表暂时不支持外键(据说 ...

  4. Spring Boot系列教程一:Eclipse安装spring-tool-suite插件

    一.前言        一直使用eclipse,个人习惯选用Eclipse+spring-tool-suite进行开发,特别注意Eclipse要选用对应的spring-tool-suite进行安装,这 ...

  5. 洛谷 P2664 树上游戏 解题报告

    P2664 树上游戏 题目描述 \(\text{lrb}\)有一棵树,树的每个节点有个颜色.给一个长度为\(n\)的颜色序列,定义\(s(i,j)\) 为 \(i\) 到 \(j\) 的颜色数量.以及 ...

  6. 解题:SCOI 2008 天平

    题面 我们很容易想到差分约束,但是我们建出来图之后好像并不好下手,因为我们只能得到砝码间的大小关系,并不能容易地得到每个砝码的具体重量. 于是我们有了一种神奇的思路:既然得不到具体重量我们就不求具体重 ...

  7. 洛谷 P1924 poj 1038

    Description: 给你一个n * m的方格纸,有一些格子无法被覆盖,然后用2*3的格子覆盖这个方格纸,问你最多能放多少个格子 神级状压 为了弄清楚这道题翻了无数篇解题报告,最后终于搞明白了 用 ...

  8. 【loj6198】谢特

    Portal -->loj6198 Solution ​ (为什么感觉loj上面这几道后缀数组的题..套路都是一样的啊qwq) ​ 同样也是..考虑某个区间\(height[i]\)的最小值的贡 ...

  9. yii2框架-yii2局部关闭(开启)csrf的验证

    (1)全局使用,我们直接在配置文件中设置enableCookieValidation为true request => [ 'enableCookieValidation' => true, ...

  10. ibatis中:org.springframework.jdbc.UncategorizedSQLException:异常

    SQL 查询语句异常,可能是你的查询语句写错了,或者是你的映射的类和或数据中与表不对应,检查你的映射配置文件.