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

[BUG] Framing a document with the traceability context raises an error #188

Closed
PatStLouis opened this issue Dec 20, 2023 · 1 comment
Closed

Comments

@PatStLouis
Copy link
Contributor

I'm having issues leveraging pyld for a traceability implementation I'm working on. Could someone provide insight to the following errors:

pyld.jsonld.JsonLdError: ('Could not expand input before framing.',)
Type: jsonld.FrameError
Cause: ('Tried to nullify a context with protected terms outside of a term definition.',)
Type: jsonld.SyntaxError
Code: invalid context nullification

Here is a simple snippet of code to reproduce it. Commenting out the traceability url from the context resolves the issue however it should be present:

from pyld import jsonld
document = {
    "@context": [
        "https://www.w3.org/ns/did/v1",
        "https://w3id.org/traceability/v1"
    ],
    "service": [
        {
            "id": "did:web:example.com#traceability-api",
            "type": "TraceabilityAPI",
            "serviceEndpoint": "https://example.com"
          }
    ]
}
frame = {}
framed = jsonld.frame(document, frame)

@dlongley 👀

Any help appreciated!

@davidlehn
Copy link
Member

2.0.4 should fix this.

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