Gettting this - AttributeError: 'Namespace' object has no attribute 'htmlpath'
/Library/Frameworks/Python.framework/Versions/3.8/bin/python3 "/Applications/PyCharm CE.app/Contents/plugins/python-ce/helpers/pycharm/_jb_pytest_runner.py" --target test_WTW.py::Test_WTW.test_cast_icon Testing started at 1:39 PM ... Launching pytest with arguments test_WTW.py::Test_WTW::test_cast_icon in /Users/hakumar/pythonProject/AppiumAndroid/tests /Applications/PyCharm CE.app/Contents/plugins/python-ce/helpers/pycharm/_jb_pytest_runner.py:28: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
if version.LooseVersion(pytest.version) >= version.LooseVersion("6.0"):
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/_pytest/config/init.py", line 1104, in getoption
INTERNALERROR> val = getattr(self.option, name)
INTERNALERROR> AttributeError: 'Namespace' object has no attribute 'htmlpath'
INTERNALERROR>
INTERNALERROR> During handling of the above exception, another exception occurred:
INTERNALERROR>
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/_pytest/main.py", line 202, in wrap_session
INTERNALERROR> config._do_configure()
INTERNALERROR> File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/_pytest/config/init.py", line 773, in _do_configure
INTERNALERROR> self.hook.pytest_configure.call_historic(kwargs=dict(config=self))
INTERNALERROR> File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pluggy/hooks.py", line 308, in call_historic
INTERNALERROR> res = self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR> File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pluggy/manager.py", line 93, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR> File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pluggy/manager.py", line 84, in
Process finished with exit code 3
Empty suite
this is how my requirement.txt file looks
pytest==4.6.11 Appium-Python-Client==1.0.2 selenium==3.141.0 driver==0.1.0 ===========**
It doesn't look like you have pytest-html installed.
Also that's a pretty old version of pytest (current is 7.2.x).
I would suggest installing 4.0.0rc1 of pytest-html and see if that solves it (which requires pytest 7 or later).