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

More detailed exceptions #137

Closed
6r1d opened this issue Mar 3, 2023 · 1 comment
Closed

More detailed exceptions #137

6r1d opened this issue Mar 3, 2023 · 1 comment
Labels
enhancement iroha2 Pull requests and issues associated with iroha 2

Comments

@6r1d
Copy link
Contributor

6r1d commented Mar 3, 2023

Today, sgull reported an error while trying to run the most basic documentation example while using a default config from the docs.

import json
from iroha2 import Client

cfg = json.loads(open("config.json").read())
cl = Client(cfg)

This is the error log, which, honestly, doesn't tell a lot to respond about:

Exception                                 Traceback (most recent call last)
Cell In[55], line 6
      4 cfg = json.loads(open("config.json").read())
      5 # cfg
----> 6 cl = Client(cfg)

File ~/.local/lib/python3.10/site-packages/iroha2/__init__.py:13, in Client.__init__(self, cfg, headers)
     11 def __init__(self, cfg, headers=None):
     12     if headers is None:
---> 13         self.cl = _Client(cfg)
     14     else:
     15         self.cl = _Client.with_headers(cfg, headers)

This error also repeats when he tries to run a test.py file.

We need to report if it's a malformed config that:

  • Can't be parsed
  • Misses some of the keys
  • Doesn't allow Iroha 2 client to connect
  • etc.

I'm certain there are several things I'm currently missing, and that doesn't allow to respond to the users. Let us discuss those and return to them later.

@6r1d 6r1d added iroha2 Pull requests and issues associated with iroha 2 enhancement labels Mar 3, 2023
@6r1d
Copy link
Contributor Author

6r1d commented Mar 3, 2023

Duplicates #92

@6r1d 6r1d closed this as completed Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement iroha2 Pull requests and issues associated with iroha 2
Projects
None yet
Development

No branches or pull requests

1 participant