Today, a package called openpyxl was used to parse the excel data to build the driver data framework.
Then the TypeError:’generator’ object is not subscriptable bug
appeared . The specific problem in the above picture appeared in print(pe.getCellOfObject(sheet, rowNo=1 , colsNo=1)) After
checking the code for a long time, there is no problem. Finally, I asked Du Niang to find out that it was the version number.
Since I installed the version of openpyxl3.0.0, I just need to replace the 2.3.3 or 2.3.5 version.
Solution:
It is recommended to change the version of openpyxl to 2.3.3 or 2.3.5
Similar Posts:
- Some solutions to the error of [the underlying provider failed on open]
- The problem of error reporting when importing openpyxl from Python has finally been solved
- Python uses xlwt length limit to report errors
- Wechat applet decrypts encrypteddata error: pad block corrupted solution
- Python FAQ – error using openpyxl module: zipfile.BadZipFile : File is not a zip file
- Emulator: Process finished with exit code 1
- [Solved] SOAP-ERROR failed to load external entity
- The causes and solutions of the exception of the specified JRE installation does not exist
- The solution of “the windows SDK version for 8.1 was not found” in vs2017 C + + compilation
- [Solved] Springboot Error: sprintgboot Unknown column ‘name’ in ‘field list’