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

**URL:** <https://community.blockcerts.org/t/blockcert-v3-invalid-json-ld-syntax-context-must-be-an-object/3126>\
**Category:** Uncategorized\
**Created:** [March 27, 2022, 5:01am UTC](https://community.blockcerts.org/t/blockcert-v3-invalid-json-ld-syntax-context-must-be-an-object/3126 "2022-03-27T05:01:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mposdev21](https://avatars.discourse-cdn.com/v4/letter/m/65b543/32.png) [@mposdev21](https://community.blockcerts.org/u/mposdev21)\
**Post date:** [March 27, 2022, 5:01am UTC](https://community.blockcerts.org/t/blockcert-v3-invalid-json-ld-syntax-context-must-be-an-object/3126/1 "2022-03-27T05:01:38Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![mposdev21](https://avatars.discourse-cdn.com/v4/letter/m/65b543/32.png) [@mposdev21](https://community.blockcerts.org/u/mposdev21)\
**Post date:** [April 1, 2022, 6:39pm UTC](https://community.blockcerts.org/t/blockcert-v3-invalid-json-ld-syntax-context-must-be-an-object/3126/2 "2022-04-01T18:39:27Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![lemoustachiste](https://avatars.discourse-cdn.com/v4/letter/l/7c8e57/32.png) [@lemoustachiste](https://community.blockcerts.org/u/lemoustachiste)\
**Post date:** [April 6, 2022, 4:19pm UTC](https://community.blockcerts.org/t/blockcert-v3-invalid-json-ld-syntax-context-must-be-an-object/3126/3 "2022-04-06T16:19:03Z")

</div>

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.
