Mismatch between Font.scheme's Set and value read from Spreadsheet

Issue #360 resolved
Chuck Wilson
created an issue

When reading in a spreadsheet (or at least the specific one I am using), openpyxl crashes with a ValueError caused by an attribute not being within a defined set. After a bit of digging, I have found the issue: Font.scheme enforces a None type, but is receiving 'none' as a string from the font parser.

It also appears that None is being passed internally, as changing the Set to accept 'none' instead of None also results in a ValueError. (Including both None and 'none' works, of course.)

I assume this has been fixed in later branches, but am submitting the bug anyway. (If you would like, I can submit a proper patch.)

Comments (4)

  1. Log in to comment