I am starting to work with Allure to make reports for my test automation team. My goal is to attach screenshots but I run into an error. The lines of code that prompt this error are:
import allure #This line runs fine
from allure.constants import AttachmentType #This one throws the error
Which throws: ModuleNotFoundError: No module named 'allure.constants'; 'allure' is not a package
I am using allure throughout different parts of the code without running into errors, for example I use the decorator:
@allure.step("Description of a step")
So the module is being correctly loaded. Upon further inspection on the internet I found links stating that I should uninstall previous packages such as pytest-allure-adaptor as seen in this other SO question. I did so but the error remains unchanged.
In order to give more context, I am using the following softaware:
IDE: Visual Studio Code OS: Windows 7 Python version: 3.6 allure-pytest: 2.8.12 allure-python-commons: 2.8.12