What Does This Python Openpyxl "ValueError" Mean?
I cannot identify why I am getting this error. Does anybody know what is the reason for such error? Traceback (most recent call last): File 'c:/Users/g401428/Documents/Visual Stu
Solution 1:
I'm going to give this an educated guess:
- The last line (
ValueError: Value must be one of {0, 1, 2, [...]
) tells us that some value in the Excel file contains an unsupported value. - Going up the traceback we see this:
[...] openpyxl\styles\alignment.py", line 59, in __init__
which leads me to believe that this is something to do with text alignment. - With this in mind, the last-line becomes a bit more interesting:
Value must be one of {0, 1, [...] 179, 180}
: The possible values range from 0 to 180. So could this possibly be related to text-rotation?
Could it be that the Excel file which works does not have any rotated text, but the file which fails does? If yes, can you try to remove the rotation and try again?
Post a Comment for "What Does This Python Openpyxl "ValueError" Mean?"