Relative Content

Tag Archive for pythonpython-3.xdocxpython-docx

python docx processing encouunter ValueError: WD_COLOR_INDEX has no XML mapping for ‘none’

I have google this error and find no-one else encounter this ValueError before. You could see from the traceback log below that the error is triggered by my code line
bg_color = run.font.highlight_color
I guess python-docx library encounter some weird case that it cannot handle? Maybe it’s some WD_COLOR_INDEX value that contain in the docx that python-docx do not recognize.