Skip to content
This repository has been archived by the owner on Nov 17, 2022. It is now read-only.

Make visible an error message about unsupported values #287

Merged
merged 5 commits into from
Mar 12, 2018

Conversation

hayfield
Copy link
Contributor

@hayfield hayfield commented Mar 8, 2018

#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

Change required to allow #284 to progress.
Undertaken separately since it does not rely on the changes between 'dev' and #284.
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 hayfield added complete A PR that is in a state that is ready for review. datasets Relating to IATI Datasets. validation Changes to validation functionality. bug-fixes Fixes to some sort of bug. error-handling Relating to error handling. labels Mar 8, 2018
@hayfield hayfield requested a review from dalepotter March 8, 2018 10:02
@hayfield hayfield added incomplete A PR that is in a state that is not ready for review. and removed complete A PR that is in a state that is ready for review. labels Mar 8, 2018
@hayfield
Copy link
Contributor Author

hayfield commented Mar 8, 2018

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.

This means that lxml has more functionality when using Python 2 than Python 3.
Due to this, a couple of tests need to expect different results based on the version of Python that is used.
It had been missed that there were linting errors due to the other tests failing, so the linting not running on Travis.
@hayfield hayfield added complete A PR that is in a state that is ready for review. and removed incomplete A PR that is in a state that is not ready for review. labels Mar 8, 2018
@hayfield hayfield merged commit 874bec6 into dev Mar 12, 2018
@hayfield hayfield deleted the dataset-string-with-encoding branch March 12, 2018 14:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug-fixes Fixes to some sort of bug. complete A PR that is in a state that is ready for review. datasets Relating to IATI Datasets. error-handling Relating to error handling. validation Changes to validation functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants