chaostoolkit / chaostoolkit-kubernetes

Kubernetes driver extension of the Chaos Toolkit probes and actions API

Home Page:https://chaostoolkit.org/drivers/kubernetes/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AttributeError on pytest

tdevilleduc opened this issue · comments

OS: Win10
Python: 3.7.5 But it's the same for 3.7.7

I'm facing a problem when I try to execute pytest

λ pytest
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "c:\users\devil\appdata\local\programs\python\python37\lib\site-packages\_pytest\main.py", line 187, in wrap_session
INTERNALERROR>     config._do_configure()
INTERNALERROR>   File "c:\users\devil\appdata\local\programs\python\python37\lib\site-packages\_pytest\config\__init__.py", line 820, in _do_configure
INTERNALERROR>     self.hook.pytest_configure.call_historic(kwargs=dict(config=self))
INTERNALERROR>   File "c:\users\devil\appdata\local\programs\python\python37\lib\site-packages\pluggy\hooks.py", line 308, in call_historic
INTERNALERROR>     res = self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR>   File "c:\users\devil\appdata\local\programs\python\python37\lib\site-packages\pluggy\manager.py", line 93, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "c:\users\devil\appdata\local\programs\python\python37\lib\site-packages\pluggy\manager.py", line 87, in <lambda>
INTERNALERROR>     firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR>   File "c:\users\devil\appdata\local\programs\python\python37\lib\site-packages\pluggy\callers.py", line 208, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "c:\users\devil\appdata\local\programs\python\python37\lib\site-packages\pluggy\callers.py", line 80, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "c:\users\devil\appdata\local\programs\python\python37\lib\site-packages\pluggy\callers.py", line 187, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "C:\Users\devil\AppData\Local\Programs\Python\Python37\lib\site-packages\pytest_sugar.py", line 176, in pytest_configure
INTERNALERROR>     sugar_reporter = SugarTerminalReporter(standard_reporter)
INTERNALERROR>   File "C:\Users\devil\AppData\Local\Programs\Python\Python37\lib\site-packages\pytest_sugar.py", line 214, in __init__
INTERNALERROR>     self.writer = self._tw
INTERNALERROR> AttributeError: can't set attribute
λ python --version
Python 3.7.5
λ pip --version
pip 20.0.2 from c:\users\devil\appdata\local\programs\python\python37\lib\site-packages\pip (python 3.7)

It's happening also on travis : https://github.com/tdevilleduc/chaostoolkit-kubernetes/runs/592029162

I've manage to get rid of this early today but reinstall python (downgrade to 3.7.5) but it appends again. The only thing I've done by then is to rebase my repo from this one

Did you ever add this behaviour ?

Hi,
I've encountered a similar error message in an WSL/Linux environment when setting up a new venv to test out a few things. As a temporary/local workaround I downgraded pytest to a 5.3.x version, which worked for me. There seems to be an issue with pytest-sugar and pytest 5.4.x: Teemu/pytest-sugar#187

Cheers, Hendrik