An error is reported when writing the specified cell. When the following two sentences are executed
name_format = workbook.add_format({'font_color': '#0000FF'})
worksheet.write('k1', os.path.basename(gtk_agile_bom_path), name_format)
worksheet.write('k1', os.path.basename(gtk_agile_bom_path), name_format) File "E:\Gerrit_Project\pyenv\bomflyenv\lib\site-packages\xlsxwriter\worksheet.py", line 82, in cell_wrapper new_args = xl_cell_to_rowcol(first_arg) File "E:\Gerrit_Project\pyenv\bomflyenv\lib\site-packages\xlsxwriter\utility.py", line 126, in xl_cell_to_rowcol col_str = match.group(2) AttributeError: 'NoneType' object has no attribute 'group'
Solution:
I found that k1,k lowercase can not be written, change it to the upper case: K1, and then run it OK
worksheet.write('K1', os.path.basename(gtk_agile_bom_path), name_format)
Read More:
- [Solved] AttributeError: ‘NoneType‘ object has no attribute ‘astype‘
- [Solved] AttributeError: ‘NoneType‘ object has no attribute ‘append‘
- [Solved] Paramiko error: AttributeError: ‘NoneType’ object has no attribute ‘time’
- [2021-10-05] Python Error: AttributeError: ‘NoneType‘ object has no attribute ‘append‘
- [Solved] Failed to initialize GLFW AttributeError: ‘NoneType’ object has no attribute ‘point_size’
- [Solved] python Error: AttributeError: ‘NoneType‘ object has no attribute ‘split‘
- [Solved] AttributeError: module ‘pandas‘ has no attribute ‘rolling_count‘
- [Solved] AttributeError WriteOnlyWorksheet object has no attribute cell
- [Solved] AttributeError: ‘PngImageFile‘ object has no attribute ‘imshow‘
- [Solved] vpython: AttributeError: ‘box‘ object has no attribute ‘idx‘
- [Solved] AttributeError: ‘str‘ object has no attribute ‘decode‘
- Python 3.7 Error: AttributeError: ‘str‘ object has no attribute ‘decode‘ [How to Solve]
- [Solved] AttributeError: ‘DataFrame‘ object has no attribute ‘tolist‘
- [Solved] AttributeError: ‘DataParallel‘ object has no attribute ‘save‘
- [Solved] AttributeError: ‘DataFrame‘ object has no attribute ‘map‘
- AttributeError: DatetimeProperties object has no attribute
- [Solved] AttributeError: ‘Manager‘ object has no attribute ‘get_by_natural_key‘
- [Solved] Add-apt-repository Command Error: AttributeError: ‘Thread‘ object has no attribute ‘isAlive‘
- Python Openyxl Error: AttributeError: ‘int‘ object has no attribute ‘upper‘ [How to Solve]
- [Solved] Pycharm error: attributeerror: ‘Htmlparser’ object has no attribute ‘unescape’