You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using qa-docs on Windows, I got the following error:
qa-docs.exe -e test_general_settings_enabled -I C:\Users\jmv74211\AppData\Local\Temp\wazuh-qa\tests
Traceback (most recent call last):
File "C:\Users\jmv74211\venv\Scripts\qa-docs-script.py", line 33, in <module>
sys.exit(load_entry_point('wazuh-testing==4.3.0', 'console_scripts', 'qa-docs')())
File "C:\Users\jmv74211\venv\lib\site-packages\wazuh_testing-4.3.0-py3.9.egg\wazuh_testing\scripts\qa_docs.py", line 42, in main
doc_check = DocGenerator(Config(CONFIG_PATH, args.test_dir, '', args.test_exist))
File "C:\Users\jmv74211\venv\lib\site-packages\wazuh_testing-4.3.0-py3.9.egg\wazuh_testing\qa_docs\doc_generator.py", line 32, in __init__
self.ignore_regex.append(re.compile(ignore_regex))
File "C:\Users\jmv74211\AppData\Local\Programs\Python\Python39\lib\re.py", line 252, in compile
return _compile(pattern, flags)
File "C:\Users\jmv74211\AppData\Local\Programs\Python\Python39\lib\re.py", line 304, in _compile
p = sre_compile.compile(pattern, flags)
File "C:\Users\jmv74211\AppData\Local\Programs\Python\Python39\lib\sre_compile.py", line 764, in compile
p = sre_parse.parse(p, flags)
File "C:\Users\jmv74211\AppData\Local\Programs\Python\Python39\lib\sre_parse.py", line 948, in parse
p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0)
File "C:\Users\jmv74211\AppData\Local\Programs\Python\Python39\lib\sre_parse.py", line 443, in _parse_sub
itemsappend(_parse(source, state, verbose, nested + 1,
File "C:\Users\jmv74211\AppData\Local\Programs\Python\Python39\lib\sre_parse.py", line 525, in _parse
code = _escape(source, this, state)
File "C:\Users\jmv74211\AppData\Local\Programs\Python\Python39\lib\sre_parse.py", line 381, in _escape
raise source.error("incomplete escape %s" % escape, len(escape))
re.error: incomplete escape \U at position 2
It seems that the qa-docs parser does not works properly on Windows.
It is requested to investigate and fix this, in order to use qa-docs and integrate it with qa-ctl tool.
Regards.
The text was updated successfully, but these errors were encountered:
Replace backslash with the slash in the paths where
the input or output directory is specified.
It seems that from Python version 3.7 onwards
backslashes are interpreted as escape characters
by the re module.
This causes problems in Windows paths.
Closes: #1930
After performing some testing, using the following paths does not cause any problems:
-C:\\Users\\jmv74211\\AppData\\Local\\Temp\\wazuh-qa\\tests
-C:/Users/jmv74211/AppData/Local/Temp/wazuh-qa/tests
It seems that from Python version 3.7 onwards, the re module interprets the backslash as an escape character, which causes errors when using Windows paths.
The fix has been to replace the backslashes with slashes in the paths used to specify the input and output directories in the config.py module of qa-docs.
It seems that from Python version 3.7 onwards
backslashes are interpreted as escape characters
by the re module.
This causes problems in Windows paths.
Closes: #1930
Replace backslash with the slash in the paths where
the input or output directory is specified.
It seems that from Python version 3.7 onwards
backslashes are interpreted as escape characters
by the re module.
This causes problems in Windows paths.
Closes: #1930
Also, bc610a3 added
When using
qa-docs
on Windows, I got the following error:It seems that the
qa-docs
parser does not works properly on Windows.It is requested to investigate and fix this, in order to use
qa-docs
and integrate it withqa-ctl
tool.Regards.
The text was updated successfully, but these errors were encountered: