Blockcert-v3 Invalid JSON-LD syntax; @context must be an object

Hi,

I am trying to run the python application cert_issuer and when I use the sample verifiable_credential.json, I end up with an issue:

pyld.jsonld.JsonLdError: (‘Invalid JSON-LD syntax; @context must be an object.’,)
Type: jsonld.SyntaxError
Code: invalid local context
Details: {‘context’: ‘https://w3id.org/blockcerts/v3’}

I am using pyld version 2.0.3. Can someone point out the problem ? Is there a specific version of pyld I should be using.

Thanks
Mohan

I found the problem. PyLd version 1.0.5 has a bug when it encounters this file : https://www.w3.org/2018/credentials/examples/v1. Initially I thought I was using an upgraded version of PyLd which looks like it was not properly installed. I am using the latest version which is 2.0.3 and was successfully use the python tool to sign the claims and establish it on ethereum ropsten network.

When you are changing the dependency to PyLd 2.0.3, you can’t use the document loader in cert_schema/jsonld_helpers.py. I commented out that and PyLd helper has its own document loader which works fine.

Thanks
-mohan

Maybe the example is not up to date? I do not encounter issues, I’ll take a look if I can but I’m quite busy at this time. Good that you found a workaround.