NCEAS / metadig-checks

MetaDIG suites and checks for data and metadata improvement and guidance.
Apache License 2.0
8 stars 9 forks source link

Metadata field decoding error #361

Closed gothub closed 4 years ago

gothub commented 4 years ago

The check resource.license.present.1' produces the following error when run against pidPPBioAmOc.229.3`:

UnicodeEncodeError: 'ascii' codec can't encode character u'\u201c' in position 0: ordinal not in range(128) in <script> at line number 26

The character referenced in the error message is a double quote.

The check script needs to encode the metadata value into a unicode type variable, as currently it uses the default Python encoding, which is ASCII.

gothub commented 4 years ago

This was fixed by using the metadig python library function toUnicode, in commit a84d0754b95f75ff8dff62ebcc9927c4d5f1f513