IIIF / api

Source for API and model specifications documents (api and model)
http://iiif.io/api
107 stars 54 forks source link

Current validator cannot handle some UTF-8 content. #1142

Closed aeschylus closed 7 years ago

aeschylus commented 7 years ago

Today we tried to validate the following manifest: http://demos.biblissima-condorcet.fr/iiif/metadata/florus-dispersus/manifest.json

We received this error: screen shot 2017-04-18 at 15 50 44

@versae notes that this is probably a Python 2 error. Are there other utf-8 manifests for which this fails, or is there something wrong with this manifest?

zimeon commented 7 years ago

I have tested this manifest locally against the current master branch with python 2.7.11 and 3.5.1 and both report the following error instead:

Validation Error: Can't add a canvas to a range that is not in the sequence: (http://www.e-codices.unifr.ch/metadata/iiif/sl-0001/canvas/bge-lat0016_0010v.json)

I think the first thing that needs to happen is to get the live validator at http://iiif.io/api/presentation/validator/service updated

azaroth42 commented 7 years ago

I downloaded, and the above issue that @zimeon reports seems to have been corrected in the mean time as it reads with no problem:

>>> from iiif_prezi.loader import ManifestReader
>>> fh = open('unicode_manifest.json')
>>> d = fh.read()
>>> fh.close()
>>> import json
>>> js = json.loads(d)
>>> r = ManifestReader(js)
>>> mf = r.read()
>>> r.get_warnings()
[]

Agree the validator needs to be on automated deployment, likely once we get a technical coordinator. The other issue is whether the representation is being served with the correct HTTP headers for its character set.

azaroth42 commented 7 years ago

Can someone validate (ha!) that this fixed please?

azaroth42 commented 7 years ago

Assume that it is.