Python-- Interface Test-- the solution to the error situation of using Times in xlwt Module
When we do interface testing, we often use xlrd and xlwt modules, and the xlrd here is relatively easy to install.
But the xlwt installation will fail, download the xlwt3 module on the Internet and then use the python setup.py install instruction to
Install. When we import this module and use it, we will encounter the following two situations:
1. Error ValueError: cannot use LOCALE flag with a str pattern
Solution:
Go to Lib under the python3 installation directory, find the ser_parse.py file, and modify line 832
Comment this line and change it to:
If you run it again, you won't get it wrong.
2. Error ValueError: 'init' in slots conflicts with class variable
Solution:
Go to Lib\ site-packages\ xlwt3\ under the python3 installation directory and find the formula.py file and modify line 7
Change it to (remove init):
If you run it again, you won't get it wrong.