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:
- [Solved] pyinstaller: error: unrecognized arguments: sklearn
- GCC error: unrecognized command line option ‘-no-pie’
- Eclipse Godson Error: Makefile:recipe for target ‘clean‘ failed
- Log4j2 reports ERROR StatusLogger Unrecognized format specifier
- (How to Fix) Ora-00600: internal error code, arguments: [4194]
- Android Studio error: unrecognized Attribute name MODULE
- How to Solve golang test Error: # command-line-arguments [command-line-arguments.test]
- The method println(boolean) in the type PrintStream is not applicable for the arguments (void) Error
- [Solved] hello.s:15 Error: junk at end of line, first unrecognized character valued 0x8
- [Solved] Hive 2.3.9 Error: Error: Unrecognized column type: UNIONTYPE (state=,code=0)
- OpenCV(-206:Bad flag (parameter or structure field)) Unrecognized or unsupported array type [How to Solve]
- How to Solve Uncaught Error: Syntax error, unrecognized expression:#
- [Solved] `handle_argument_error‘: ERROR: “rails console“ was called with arguments [“production“]
- The uibot database connection is unrecognized error: The object definition error
- [Solved] Error: The superclass, ‘Animal‘, has no unnamed constructor that takes no arguments.
- How to Fix msgsend() error: to many arguments to function call, expected 0, have2
- Solve Maven project running error Failed to clean project: Failed to delete
- Remix Run Error: creation of errored:Error encoding arguments:Error:invalid arrayify value
- Go declares that the local variable does not use command line arguments. Main. Go: 4:6: a declared but not used
- package golang.org/x/net/XXX: unrecognized import path “golang.org/x/net/xxx“…