IBM-Blockchain-Identity / indy-ssivc-tutorial

A turnkey, Docker-based tutorial for help developers get acquainted with Self-Sovereign Identity and Verifiable Credentials.
Apache License 2.0
79 stars 73 forks source link

JSONDecodeError when defining a new Permitify Service #18

Closed jolapin closed 6 years ago

jolapin commented 6 years ago

Dear all,

I'm using your project and trying to play around with it, make it evolve in order to understand better the interactions and dependencies between the different components. I was able to run the project as it is, but when defining a new service in Permitify, I get an error in my browser when going on the newly created services URL:

Environment:

Request Method: GET
Request URL: http://localhost:5010/

Django Version: 2.0
Python Version: 3.5.2
Installed Applications:
['django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'von_connector']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware']

Traceback:

File "/usr/local/lib/python3.5/dist-packages/django/core/handlers/exception.py" in inner
  35.             response = get_response(request)

File "/usr/local/lib/python3.5/dist-packages/django/core/handlers/base.py" in _get_response
  128.                 response = self.process_exception_by_middleware(e, request)

File "/usr/local/lib/python3.5/dist-packages/django/core/handlers/base.py" in _get_response
  126.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/app/permitify/views.py" in index
  57.     proof_request_manager = ProofRequestManager()

File "/app/von_connector/proof.py" in __init__
  32.         self.proof_request = json.loads(proof_request_json)

File "/usr/lib/python3.5/json/__init__.py" in loads
  319.         return _default_decoder.decode(s)

File "/usr/lib/python3.5/json/decoder.py" in decode
  339.         obj, end = self.raw_decode(s, idx=_w(s, 0).end())

File "/usr/lib/python3.5/json/decoder.py" in raw_decode
  355.             obj, end = self.scan_once(s, idx)

Exception Type: JSONDecodeError at /
Exception Value: Expecting ',' delimiter: line 76 column 1 (char 1528)

In order to do so I followed the instructions from the official Permitify git page : https://github.com/bcgov/permitify#setting-up-a-new-issuing-service-in-permitify

Unfortunately it is mentioning actions to be done in the OrgBook but I cannot see any related files in the current project.

Thanks in advance for your help or comments.

jolapin commented 6 years ago

Rebuild was necessary...