IATI / pyIATI

pyIATI - a developer's toolkit for IATI - Deprecated - No longer supported
MIT License
5 stars 5 forks source link

Make visible an error message about unsupported values #287

Closed hayfield closed 6 years ago

hayfield commented 6 years ago

286 should be merged first

lxml does not support strings with an encoding declaration. They must be bytes objects if there is an encoding declaration. Previously, this error was grouped in with others. This separates two possible ValueErrors that lxml may raise so that it's clearer.

This issue was highlighted in #285

hayfield commented 6 years ago

The tests are failing because a str and a bytes are equivalent at Python 2. This means that lxml has more functionality when using Python 2 than Python 3, so the error does not occur.