pyld icon indicating copy to clipboard operation
pyld copied to clipboard

issue with jsonld.normalize().

Open amarts opened this issue 6 years ago • 3 comments

I was trying to run sign/verify on the same jsonld samples from https://github.com/digitalbazaar/vc-demo/blob/master/credentials/alumni.jsonld in python.

While trying to run jsonld.normalize() I am getting errors.

Traceback (most recent call last):
  File "/home/amar/work/test/certapp-test/jsonld.py", line 1134, in to_rdf
    expanded = self.expand(input_, options)
  File "/home/amar/work/test/certapp-test/jsonld.py", line 835, in expand
    expanded = self._expand(active_ctx, None, document, options, False)
  File "/home/amar/work/test/certapp-test/jsonld.py", line 2090, in _expand
    active_ctx, element['@context'], options)
  File "/home/amar/work/test/certapp-test/jsonld.py", line 2833, in _process_context
    self._create_term_definition(rval, ctx, k, defined)
  File "/home/amar/work/test/certapp-test/jsonld.py", line 4345, in _create_term_definition
    {'context': local_ctx}, code='invalid term definition')
jsonld.JsonLdError: ('Invalid JSON-LD syntax; @context property values must be strings or objects.',)
Type: jsonld.SyntaxError
Code: invalid term definition

amarts avatar Sep 27 '19 14:09 amarts

Those examples are not likely to work at the moment since PyLD doesn't yet support the latest 1.1 spec. Full 1.1 support is a work in progress.

davidlehn avatar Sep 27 '19 15:09 davidlehn

Thanks for confirming.

amarts avatar Sep 27 '19 16:09 amarts

PyLD 2.0.0 has been released. It should be able to handle those examples.

davidlehn avatar Apr 15 '20 06:04 davidlehn