Skip to content

Question: Referencing "http://purl.archive.org/language-data-commons/context.json" in the context #4

@marcolarosa

Description

@marcolarosa

I'm going through the validator and updating the paradisec exporter and I'm not sure what to do about this issue. When I flatten or compact the crate with the following context I get an error:

[
        "https://w3id.org/ro/crate/1.1/context",
        "http://purl.archive.org/language-data-commons/context.json",
        {
            "@vocab": "http://schema.org/",
        },
        {
            "@base": null,
        },
    ]

And the error is:

jsonld.InvalidUrl: Dereferencing a URL did not result in a JSON object. The response was valid JSON, but it was not a JSON object.
    at ContextResolver._fetchContext (/Users/mlarosa/src/pdsc/nabu-exporter/node_modules/jsonld/lib/ContextResolver.js:186:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async ContextResolver._resolveRemoteContext (/Users/mlarosa/src/pdsc/nabu-exporter/node_modules/jsonld/lib/ContextResolver.js:117:34)
    at async ContextResolver.resolve (/Users/mlarosa/src/pdsc/nabu-exporter/node_modules/jsonld/lib/ContextResolver.js:50:22)
    at async api.process (/Users/mlarosa/src/pdsc/nabu-exporter/node_modules/jsonld/lib/context.js:87:20)
    at async api.expand (/Users/mlarosa/src/pdsc/nabu-exporter/node_modules/jsonld/lib/expand.js:214:17)
    at async Function.jsonld.expand (/Users/mlarosa/src/pdsc/nabu-exporter/node_modules/jsonld/lib/jsonld.js:321:18)
    at async Function.jsonld.compact (/Users/mlarosa/src/pdsc/nabu-exporter/node_modules/jsonld/lib/jsonld.js:171:16)
    at async exportItem (/Users/mlarosa/src/pdsc/nabu-exporter/src/tools/export.js:100:17)
    at async /Users/mlarosa/src/pdsc/nabu-exporter/src/tools/export.js:57:9 {
  details: {
    code: 'invalid remote context',
    url: 'http://purl.archive.org/language-data-commons/context.json'
  }
}

Looking at the browser console the response header content-type is "text/html".
Screenshot 2022-12-07 at 1 19 04 pm

If I do the same with the ro crate context the content-type is "application/ld+json"
Screenshot 2022-12-07 at 1 19 08 pm

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions