Error while generating allure report | Selenium Python Forum
G
Gaurav Valera Posted on 17/01/2021

Hi,

I am not able to generate allure report for any script

Note:

i. Allure envrionment is set

ii. If I run pytest -s 'filename' then it works as expected. But not working when I give alluredir path

Code:

def test_demo1():
    print('this is pytest')

Error:

C:\Git_Data\automationFrameworks\SelFinal\allureops>py.test --alluredir='C:\\Git_Data\\automationFrameworks\\SelFinal\\allureReport' -v -s test_pydemo.py
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "c:\users\gaura\appdata\local\programs\python\python39\lib\site-packages\_pytest\main.py", line 265, in wrap_session
INTERNALERROR>     config._do_configure()
INTERNALERROR>   File "c:\users\gaura\appdata\local\programs\python\python39\lib\site-packages\_pytest\config\__init__.py", line 982, in _do_configure
INTERNALERROR>     self.hook.pytest_configure.call_historic(kwargs=dict(config=self))
INTERNALERROR>   File "c:\users\gaura\appdata\local\programs\python\python39\lib\site-packages\pluggy\hooks.py", line 308, in call_historic
INTERNALERROR>     res = self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR>   File "c:\users\gaura\appdata\local\programs\python\python39\lib\site-packages\pluggy\manager.py", line 93, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "c:\users\gaura\appdata\local\programs\python\python39\lib\site-packages\pluggy\manager.py", line 84, in <lambda>
INTERNALERROR>     self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
INTERNALERROR>   File "c:\users\gaura\appdata\local\programs\python\python39\lib\site-packages\pluggy\callers.py", line 208, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "c:\users\gaura\appdata\local\programs\python\python39\lib\site-packages\pluggy\callers.py", line 80, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "c:\users\gaura\appdata\local\programs\python\python39\lib\site-packages\pluggy\callers.py", line 187, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "c:\users\gaura\appdata\local\programs\python\python39\lib\site-packages\allure_pytest\plugin.py", line 134, in pytest_configure
INTERNALERROR>     file_logger = AllureFileLogger(report_dir, clean)
INTERNALERROR>   File "c:\users\gaura\appdata\local\programs\python\python39\lib\site-packages\allure_commons\logger.py", line 21, in __init__
INTERNALERROR>     os.makedirs(report_dir)
INTERNALERROR>   File "c:\users\gaura\appdata\local\programs\python\python39\lib\os.py", line 215, in makedirs
INTERNALERROR>     makedirs(head, exist_ok=exist_ok)
INTERNALERROR>   File "c:\users\gaura\appdata\local\programs\python\python39\lib\os.py", line 215, in makedirs
INTERNALERROR>     makedirs(head, exist_ok=exist_ok)
INTERNALERROR>   File "c:\users\gaura\appdata\local\programs\python\python39\lib\os.py", line 215, in makedirs
INTERNALERROR>     makedirs(head, exist_ok=exist_ok)
INTERNALERROR>   [Previous line repeated 1 more time]
INTERNALERROR>   File "c:\users\gaura\appdata\local\programs\python\python39\lib\os.py", line 225, in makedirs
INTERNALERROR>     mkdir(name, mode)
INTERNALERROR> OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: "C:\\Git_Data\\automationFrameworks\\SelFinal\\al
lureops\\'C:"

J
Jaspreet Replied on 19/01/2021

Hey

Kindly please share the file on which you are trying to generate reports and the screenshot for report generation environment set by you. 


Related Posts