[Solved] allure Error: unrecognized arguments: — alluredir — clean alluredir

An integrated environment has been built locally and runs smoothly. When moving to the ECS for construction, allure always reports an error and prompts that the command is wrong. After repeatedly comparing various modules and versions of python, it is found that they are the same and always report this error

ubuntu@VM-16-9-ubuntu:/var/lib/jenkins/workspace/autotest_daily/pytestdemo$ sudo python3 all.py 
ERROR: usage: all.py [options] [file_or_dir] [file_or_dir] [...]
all.py: error: unrecognized arguments: --alluredir --clean-alluredir
  inifile: /var/lib/jenkins/workspace/autotest_daily/pytestdemo/pytest.ini
  rootdir: /var/lib/jenkins/workspace/autotest_daily/pytestdemo

I searched everywhere but couldn’t find it. I thought there was a problem with the version of allure pytest. Compared with the version number, the version number is the same, because the difference between the two servers lies in the difference of source addresses. Is there any difference in the same version? Stuck here for an hour, execute   Sudo PIP3 install — upgrade allure pytest

Installing collected packages: six, allure-python-commons, allure-pytest
Successfully installed allure-pytest-2.9.45 allure-python-commons-2.9.45 six-1.16.0

The problem is that the version of six is different. Finally, we found a different version. The version of six used for local construction is 1.14.0 and the server is 1.16.0

Attempt to downgrade the version of six

sudo pip3 install six==1.14.0

Then continue to build. When pytest is executed normally, the build is OK. I have to say that there are so many holes in Python.

The question is, what does six do?

I searched it again. This thing is used to be compatible with Python 2 and 3 modules. It can be seen from this,

allure   allure-pytest                     2.9.45
allure-python-commons             2.9.45

The first two modules are incompatible with six 1.16.0, so they bring this kind of pit.

Read More: