presentation-validator icon indicating copy to clipboard operation
presentation-validator copied to clipboard

Validator says not okay but doesn't show error or warnings

Open minusdavid opened this issue 7 years ago • 5 comments

The validator has an "okay" value of 0, but "error" is "u'value'" and warnings is an empty array (ie []).

minusdavid avatar Mar 20 '18 04:03 minusdavid

So this looks like it's probably an issue with iiif-prezi...

minusdavid avatar Mar 20 '18 04:03 minusdavid

Using the traceback module, I got the following stack trace:

Traceback (most recent call last): File "./presentation-validator/iiif-presentation-validator.py", line 52, in check_manifest mf = reader.read() File "/home/david/.local/lib/python2.7/site-packages/iiif_prezi/loader.py", line 152, in read top = self.readObject(js) File "/home/david/.local/lib/python2.7/site-packages/iiif_prezi/loader.py", line 381, in readObject what.set_metadata(self.labels_and_values(item)) File "/home/david/.local/lib/python2.7/site-packages/iiif_prezi/loader.py", line 181, in labels_and_values iv = item['value'] KeyError: u'value'

minusdavid avatar Mar 20 '18 04:03 minusdavid

Looking at my manifest, it definitely isn't adhering to the IIIF spec at http://iiif.io/api/presentation/2.1/#manifest.

I'm getting that error since I don't have label and value keys in my metadata array.

I'll have to look at O'Sullivan to see what went wrong there...

So yeah... I'd say a bug in iiif_prezi that it's not recognizing a structural problem with the metadata property?

minusdavid avatar Mar 20 '18 05:03 minusdavid

Can you put in the structure that was generated for the metadata? Something without value I expect, but would be good to have a test for this :)

azaroth42 avatar Mar 20 '18 15:03 azaroth42

No worries. I was using this as an example: https://gist.github.com/jpstroop/b0b18e18fb8b96bb114c, so that should work.

Basically this:

"metadata": [
    {
      "Foo": "Bar"
    },
    {
      "Bazzers": [
        "Quux",
        "Corge"
      ]
    }
  ],

minusdavid avatar Mar 20 '18 23:03 minusdavid