I encountered this when using Vault to load "https://t-pen.org/TPEN/canvas/13250383", a Presi 2 Canvas, as a test for my interface. It landed here:
Error: Resource type is not known
at Ye (chunk-W3DWL6UZ.js:1:781)
at e.traverseUnknown (chunk-W3DWL6UZ.js:1:7350)
at Ut (chunk-HF3WYIOE.js:1:9547)
at chunk-EIMQCVDV.js:18:43
at u (chunk-EIMQCVDV.js:162:26)
at chunk-EIMQCVDV.js:171:20
at async AnnotoriousAnnotator.processCanvas (line-parser.js:366:24)
The upgrader sees "sc:Canvas" and strips the prefix
|
function removePrefix(str: string) { |
|
for (const prefix of ['sc', 'oa', 'dcterms', 'dctypes', 'iiif']) { |
|
if (str.startsWith(`${prefix}:`)) { |
|
return str.slice(prefix.length + 1); |
|
} |
|
} |
|
|
|
return str; |
|
} |
At
|
const knownTypes = ['Collection', 'Manifest', 'Annotation', 'AnnotationPage', 'Range', 'Service']; |
the
knownTypes do not include "Canvas" so I am led to believe that a either a Presi 2 Canvas can only be upgraded within the processing of a Manifest or that (because it tends to be forwards-compatible) it is just not handled and has tended to work.
I can put some time against this, but not immediately. If there are any intellects that can shorten the path to success with bits of advice, I'd ratehr contribute back to iiif-helpers than just get it working on my machine.
I encountered this when using Vault to load "https://t-pen.org/TPEN/canvas/13250383", a Presi 2 Canvas, as a test for my interface. It landed here:
Error: Resource type is not known at Ye (chunk-W3DWL6UZ.js:1:781) at e.traverseUnknown (chunk-W3DWL6UZ.js:1:7350) at Ut (chunk-HF3WYIOE.js:1:9547) at chunk-EIMQCVDV.js:18:43 at u (chunk-EIMQCVDV.js:162:26) at chunk-EIMQCVDV.js:171:20 at async AnnotoriousAnnotator.processCanvas (line-parser.js:366:24)The upgrader sees "sc:Canvas" and strips the prefix
parser/src/presentation-2/upgrader.ts
Lines 157 to 165 in dcbb102
At
parser/src/presentation-2/upgrader.ts
Line 167 in dcbb102
knownTypesdo not include "Canvas" so I am led to believe that a either a Presi 2 Canvas can only be upgraded within the processing of a Manifest or that (because it tends to be forwards-compatible) it is just not handled and has tended to work.I can put some time against this, but not immediately. If there are any intellects that can shorten the path to success with bits of advice, I'd ratehr contribute back to iiif-helpers than just get it working on my machine.