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

enroll admin error #134

Open
DSSLab-code opened this issue Feb 5, 2021 · 2 comments
Open

enroll admin error #134

DSSLab-code opened this issue Feb 5, 2021 · 2 comments

Comments

@DSSLab-code
Copy link

DSSLab-code commented Feb 5, 2021

Hi, all!

I set all the environment locally and run the fabcar example in fabric_sample.
downloaded this python version sdk, run : adminEnrollment = casvc.enroll("admin","adminpw")

the error shows like: json.decoder.JSONDecodeError expecting value: line 1 column 1 (char 0)

I was blocked by this error for 2 days, if anyone knows why just let me know, thank you in advance!

Init client with profile=test/fixtures/network.json
create org with name=orderer.example.com
create org with name=org1.example.com
create org with name=org2.example.com
create ca with name=ca-org1
create ca with name=ca-org2
Import orderers = dict_keys(['orderer.example.com'])
Import peers = dict_keys(['peer0.org1.example.com', 'peer1.org1.example.com', 'peer0.org2.example.com', 'peer1.org2.example.com'])
Traceback (most recent call last):
File "lr.py", line 61, in
adminEnrollment = casvc.enroll("admin","adminpw") # now local will have the admin enrollment
File "/home/yusen/Desktop/fabric-sdk-py/hfc/fabric_ca/caservice.py", line 484, in enroll
enrollmentCert, caCertChain = self._ca_client.enroll(
File "/home/yusen/Desktop/fabric-sdk-py/hfc/fabric_ca/caservice.py", line 328, in enroll
res, st = self._send_ca_post(path='enroll',
File "/home/yusen/Desktop/fabric-sdk-py/hfc/fabric_ca/caservice.py", line 255, in _send_ca_post
return r.json(), r.status_code
File "/home/yusen/anaconda3/lib/python3.8/site-packages/requests/models.py", line 889, in json
return complexjson.loads(
File "/home/yusen/anaconda3/lib/python3.8/json/init.py", line 357, in loads
return _default_decoder.decode(s)
File "/home/yusen/anaconda3/lib/python3.8/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/home/yusen/anaconda3/lib/python3.8/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

@DSSLab-code
Copy link
Author

Well, if I use the internal example of up the fabric network, it works.
E.g run this: docker-compose -f test/fixtures/docker-compose-2orgs-4peers-tls.yaml up

@dexhunter
Copy link
Member

Which version of fabric & fabcar are you using?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants