Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
minusdavid opened this issue Mar 20, 2018 · 5 comments
Open

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

minusdavid opened this issue Mar 20, 2018 · 5 comments

Comments

@minusdavid
Copy link
Contributor

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

@minusdavid
Copy link
Contributor Author

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

@minusdavid
Copy link
Contributor Author

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
Copy link
Contributor Author

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?

@azaroth42
Copy link
Member

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 :)

@minusdavid
Copy link
Contributor Author

minusdavid commented Mar 20, 2018

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"
      ]
    }
  ],

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants