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

local variable 'error' referenced before assignment #152

Open
donaldgray opened this issue Oct 7, 2022 · 1 comment
Open

local variable 'error' referenced before assignment #152

donaldgray opened this issue Oct 7, 2022 · 1 comment

Comments

@donaldgray
Copy link

I was attempting to validate a manifest using the website and wasn't getting results back (I got a 504/503 subsequently so think I may have crashed the ECS service - apologies).

I tried running the validator locally and was presented with the following error:

Presentation Validator bug: "local variable 'error' referenced before assignment". Please create a <a href="https://github.com/IIIF/presentation-validator/issues\">Validator Issue, including a link to the manifest.

I've taken a copy of the manifest here (as I'm planning to update the source) - https://github.com/donaldgray/donaldgray/blob/master/iiif/id_issue.json

I tracked the issue down to the fact that the manifest is 3.0 with 2.0 image services. However, the thumbnails have "id" rather than "@id":

"service": [
{
    "id": "https://digitalcollections-api-dlcs.arts.ac.uk/thumbs/2/1/8924cc9c-bdc4-4256-9f7b-e9471308ab5d",
    "@type": "ImageService2",
    "profile": "http://iiif.io/api/image/2/level2.json",
    "sizes": [
    { "width": 1057, "height": 1500 },
    { "width": 423, "height": 600 },
    { "width": 211, "height": 300 },
    { "width": 70, "height": 100 }
    ]
}
]

changing this to "@id": "https://digitalcollections-api-dlcs.arts.ac.uk/thumbs/2/1/8924cc9c-bdc4-4256-9f7b-e9471308ab5d", caused the validator to succeed

@thehabes
Copy link

We also ran into this testing the Presentation API 3 update some Open Source with SLU Students @markskroba @tvay11 and @DrewSadler01 are working on.

Here is one those Manifest that gave us this error (it is on a GitHub Pages site that might go away, sorry if it does. I can update the link if it is important in the future)

https://thehabes.github.io/GeoreferencePrototype/prototypes/7312.json

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