前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >专栏 >安装allure后执行命令后报错 INTERNALERROR> AttributeError: module 'pytest' has no attribute 'allure'

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

作者头像
小黑同学
发布于 2020-08-17 07:27:31
发布于 2020-08-17 07:27:31
1.3K00
代码可运行
举报
文章被收录于专栏:E=mc²E=mc²
运行总次数:0
代码可运行

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

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
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

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2019/06/24 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
暂无评论
推荐阅读
编辑精选文章
换一批
Pytest配置文件pytest.ini
pytest.ini文件是pytest的主配置文件,可以改变pytest的运行方式,它是一个固定的文件pytest.ini文件,读取配置信息,按指定的方式去运行。pytest.ini的位置:一般放在项目工程的根目录(即当前项目的顶级文件夹下)
王大力测试进阶之路
2020/09/15
2.1K0
Pytest配置文件pytest.ini
pytest学习和使用1-pytest安装和版本查看
https://docs.pytest.org/en/latest/index.html
虫无涯
2023/02/06
1.6K0
Pytest Pytest源码分析
这里的main函数为从_pytest/config/__init__.py定义的全局函数--main函数
授客
2021/03/04
2.2K0
Pytest Hooks方法之pytest_runtest_makereport获取测试用例结果
pytest提供的钩子(Hooks)方法之pytest_runtest_makereport,可以更清晰的了解用例的执行过程,并获取到每个用例的执行结果。
王大力测试进阶之路
2020/05/20
2.6K0
pytest学习和使用21-测试报告插件allure-pytest如何使用?
详细内容可以参考官方文档:https://docs.qameta.io/allure-report/;
虫无涯
2023/03/22
1.3K0
django 报错 Error loading either pysqlite2 or sqlite3 modules
http://stackoverflow.com/questions/1210664/no-module-named-sqlite3
魔王卷子
2019/06/02
2.1K0
启动 celery worker 报错:AttributeError: 'str' object has no attribute 'items'
错误日志 (joyoo) yinzhuoqundeMacBook-Pro:joyoo yinzhuoqun$ python manage.py celery worker --loglevel=info raven.contrib.django.client.DjangoClient: 2019-12-15 02:07:00,997 /Users/yinzhuoqun/.pyenv/joyoo/lib/python3.6/site-packages/raven/base.py [line:213] INF
卓越笔记
2023/02/18
5560
pytest学习和使用19-pytes断言失败后,怎样保持后续的断言继续执行?(pytest-assume)
1 引入pytest使用assert进行断言,如果有多个断言,第一个失败了,那么后续的断言将不会执行;那么如果第一个断言失败了,还想继续保持执行后边的断言,那如何做?我们可以使用pytest-assume来解决这个问题,即使用多重断言插件。2 pytest-assume安装pip3 install pytest-assumeC:\Users\Administrator>pip3 install pytest-assumeLooking in indexes: https://pypi.tuna.tsingh
虫无涯
2023/03/17
1.1K0
pytest文档 87 - 如何禁用插件
在运行用例的时候,我们可能出于某种需求,不想加载某个插件,比如我通过pip安装了一个pytest的插件。 后续我想修改插件的一些代码,于是放到项目本地,自己去注册本地插件了。这样就需要禁用 pip 安装的那个插件。
上海-悠悠
2023/08/22
2590
pytest文档 87 - 如何禁用插件
pytest学习和使用22-allure特性 丨总览中的Environment、Categories设置以及Flaky test使用
如下图,我们可以看到allure报告的总览,里边的一些特性是可以自定义设置的。图片1 Environment设置Environment可以理解为环境变量;默认为空;可以自己设置。1.1 设置方法在存放测试报目录下创建environment.properties或者environment.xml文件;而测试报告目录是使用--alluredir指定的目录,比如:--alluredir allure-results比如之前提到的用例:pytest -n auto --alluredir=allure-result
虫无涯
2023/03/28
4720
Pytest自定义标记mark及指定文件/类/方法/用例执行
pytest.main(['-s','test01.py','-m=test'])
王大力测试进阶之路
2019/12/15
1.9K0
pytest学习和使用15-Pytest用例失败如何重跑?(pytest-rerunfailures的简单使用)
1 简介 用例失败重跑可以使用插件pytest-rerunfailures来实现; pytest-rerunfailures有环境要求: Python 3.5-3.8, or PyPy3 pytest 5.0或更高版本 查看下自己的版本,如下: Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "
虫无涯
2023/02/20
7680
pytest学习和使用20-pytest如何进行分布式测试?(pytest-xdist)
1 什么是分布式测试?在进行本文之前,先了解些基础知识,什么是分布式测试?分布式测试:是指通过局域网和Internet,把分布于不同地点、独立完成特定功能的测试计算机连接起来,以达到测试资源共享、分散操作、集中管理、协同工作、负载均衡、测试过程监控等目的的计算机网络测试。通俗的讲:分布式测试 就是活太多,一个人干费时间,那就让多个人一起干,节省了资源和时间。2 为什么要进行分布式测试?2.1 场景1:自动化测试场景自动化测试时,我们有很多用例,比如2000条用例,按照顺序执行,每条用例执行1分钟,那需要20
虫无涯
2023/03/21
1.4K0
Tensorflow protobuf版本报错问题解决(AttributeError: 'module' object has no attribute 'Default')
本文介绍了在Tensorflow中使用protobuf时遇到的报错问题,通过升级protobuf库版本以及使用默认的pool来解决这个问题。同时,文章也介绍了一些可能的原因和解决方法。
sparkexpert
2018/01/09
6.2K0
model_utils _clone() got an unexpected keyword argument 'subclasses'
发生环境 从 Django 1.11 迁移到 Django 2.2 错误日志 django.request: 2020-05-22 16:12:18,196 E:\py_virtualenv\joyoo\lib\site-packages\django\utils\log.py [line:228] ERROR Internal Server Error: /friendUrlAdd/ Traceback (most recent call last): File "E:\py_virtualenv\j
卓越笔记
2023/02/18
2260
Allure使用笔记-安装
There are lots of cool testing frameworks for different programming languages. Unfortunately only a few of them can provide good representation of test execution output. The Qameta Software testing team is working on Allure - an open-source framework designed to create test execution reports that are clear to everyone in the team.
louiezhou001
2021/12/10
5890
Allure使用笔记-安装
raise ValueError("Cannot convert {0!r} to Excel".format(value))
I have hundreds of XML files that I need to extract two values from and ouput in an Excel or CSV file. This is the code I currently have:
hankleo
2020/09/17
3.4K0
自动化测试报告样式HTMLTestRunner、BeautifulReport、HTMLReport、Allure你喜欢哪个?
https://repo.maven.apache.org/maven2/io/qameta/allure/allure-commandline/
虫无涯
2023/07/07
1.2K0
使用torchvision时报错:ModuleNotFoundError: No module named ‘six‘
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/152585.html原文链接:https://javaforall.cn
全栈程序员站长
2022/09/12
1.1K0
Superset执行「superset db upgrade」命令的报错记录
关于TypedDict的这个error,其实是Python版本的问题 这里需要将更换为Python3.9
WHYBIGDATA
2023/01/31
2.3K0
Superset执行「superset db upgrade」命令的报错记录
推荐阅读
相关推荐
Pytest配置文件pytest.ini
更多 >
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档
本文部分代码块支持一键运行,欢迎体验
本文部分代码块支持一键运行,欢迎体验