Better exception handling with human-readable error message when trying to load a non-unicode file with TextDataStorage.load_data.
Cryptic UnicodeDecodeError is translated into a clear ValueError error message.
Motivation and Context
Original UnicodeDecodeError message was not very helpful for users.
How Has This Been Tested?
On dummy Win 10.0.19044 Python 3.9.10
Types of changes:
[ ] Bug fix
[x] New feature
[ ] Breaking change (Causes existing functionality to not work as expected)
Checklist:
[x] My code follows the code style of this project.
[ ] I have documented my changes in /docs/changelog.md.
[ ] My change requires additional/updated documentation.
[ ] I have updated the documentation accordingly.
[ ] I have added/updated the config example for any module docstrings as necessary.
[x] I have checked that the change does not contain obvious errors
(syntax, indentation, mutable default values, etc.).
[ ] I have tested my changes using 'Load all modules' on the default dummy configuration.
[ ] All changed Jupyter notebooks have been stripped of their output cells.
Description
Better exception handling with human-readable error message when trying to load a non-unicode file with
TextDataStorage.load_data
. CrypticUnicodeDecodeError
is translated into a clearValueError
error message.Motivation and Context
Original
UnicodeDecodeError
message was not very helpful for users.How Has This Been Tested?
On dummy Win 10.0.19044 Python 3.9.10
Types of changes:
Checklist:
/docs/changelog.md
.