Output
```
Traceback (most recent call last):
File "/root/wazuh-qa/venv/lib/python3.11/site-packages/py/_vendored_packages/apipkg/__init__.py", line 145, in __makeattr
modpath, attrname = self.__map__[name]
~~~~~~~~~~~~^^^^^^
KeyError: '__spec__'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "", line 189, in _run_module_as_main
File "", line 148, in _get_module_details
File "", line 112, in _get_module_details
File "/root/wazuh-qa/venv/lib/python3.11/site-packages/pytest/__init__.py", line 5, in
from _pytest._code import ExceptionInfo
File "/root/wazuh-qa/venv/lib/python3.11/site-packages/_pytest/_code/__init__.py", line 2, in
from .code import Code
File "/root/wazuh-qa/venv/lib/python3.11/site-packages/_pytest/_code/code.py", line 43, in
from _pytest._io import TerminalWriter
File "/root/wazuh-qa/venv/lib/python3.11/site-packages/_pytest/_io/__init__.py", line 1, in
from .terminalwriter import get_terminal_width
File "/root/wazuh-qa/venv/lib/python3.11/site-packages/_pytest/_io/terminalwriter.py", line 10, in
from _pytest.compat import final
File "/root/wazuh-qa/venv/lib/python3.11/site-packages/_pytest/compat.py", line 35, in
LEGACY_PATH = py.path. local
^^^^^^^^^^^^^^
File "/root/wazuh-qa/venv/lib/python3.11/site-packages/py/_vendored_packages/apipkg/__init__.py", line 152, in __makeattr
result = importobj(modpath, attrname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/wazuh-qa/venv/lib/python3.11/site-packages/py/_vendored_packages/apipkg/__init__.py", line 72, in importobj
module = __import__(modpath, None, None, ['__doc__'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1176, in _find_and_load
File "", line 1136, in _find_and_load_unlocked
File "/root/wazuh-qa/venv/lib/python3.11/site-packages/py/_vendored_packages/apipkg/__init__.py", line 150, in __makeattr
raise AttributeError(name)
AttributeError: __spec__
```
Fixing the issue
@juliamagan found out that this problem is caused by an old version of py. We need py ≥ 3.11.0.
We've run into some trouble launching the Wazuh-DB integration tests.
Environment
Current behavior
Setup
Command
Output
``` Traceback (most recent call last): File "/root/wazuh-qa/venv/lib/python3.11/site-packages/py/_vendored_packages/apipkg/__init__.py", line 145, in __makeattr modpath, attrname = self.__map__[name] ~~~~~~~~~~~~^^^^^^ KeyError: '__spec__' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "Fixing the issue
@juliamagan found out that this problem is caused by an old version of py. We need py ≥ 3.11.0.
Output
``` ============================= test session starts ============================== platform linux -- Python 3.11.6, pytest-7.1.2, pluggy-1.5.0 -- /root/wazuh-qa/venv/bin/python3 cachedir: .pytest_cache metadata: {'Python': '3.11.6', 'Platform': 'Linux-6.5.0-28-generic-aarch64-with-glibc2.38', 'Packages': {'pytest': '7.1.2', 'pluggy': '1.5.0'}, 'Plugins': {'testinfra': '5.0.0', 'html': '3.1.1', 'metadata': '3.1.1'}} rootdir: /root/wazuh-qa/tests/integration, configfile: pytest.ini plugins: testinfra-5.0.0, html-3.1.1, metadata-3.1.1 collected 1 item tests/integration/test_wazuh_db/test_agent_database_version.py::test_agent_database_version PASSED ============================== 1 passed in 33.42s ============================== ```