Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
silkaj
silkaj
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 153
    • Issues 153
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 5
    • Merge Requests 5
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Package Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • clients
  • python
  • silkajsilkaj
  • Issues
  • #297

Closed
Open
Opened Feb 19, 2020 by Moul@moulOwner0 of 4 tasks completed0/4 tasks

Get the info card of an identity (member or not)

moul-test identity is inside the blocks frame but is not member and caused an exception:

silkaj -p gt.moul.re:10902 blocks 100
Traceback (most recent call last):
  File "/home/moul/silkaj/silkaj/wot.py", line 207, in identity_of
    return await client(wot.identity_of, pubkey_uid)
  File "/home/moul/.cache/pypoetry/virtualenvs/silkaj-58dUTebQ-py3.7/lib64/python3.7/site-packages/duniterpy/api/bma/wot.py", line 343, in identity_of
    MODULE + "/identity-of/%s" % search, schema=IDENTITY_OF_SCHEMA
  File "/home/moul/.cache/pypoetry/virtualenvs/silkaj-58dUTebQ-py3.7/lib64/python3.7/site-packages/duniterpy/api/client.py", line 358, in get
    response = await client.requests_get(url_path, **params)
  File "/home/moul/.cache/pypoetry/virtualenvs/silkaj-58dUTebQ-py3.7/lib64/python3.7/site-packages/duniterpy/api/client.py", line 244, in requests_get
    raise DuniterError(error_data)
duniterpy.api.errors.DuniterError: Error code 1002 - Not a member

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/moul/.cache/pypoetry/virtualenvs/silkaj-58dUTebQ-py3.7/bin/../bin/silkaj", line 11, in <module>
    load_entry_point('silkaj', 'console_scripts', 'silkaj')()
  File "/home/moul/.cache/pypoetry/virtualenvs/silkaj-58dUTebQ-py3.7/lib64/python3.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/moul/.cache/pypoetry/virtualenvs/silkaj-58dUTebQ-py3.7/lib64/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/moul/.cache/pypoetry/virtualenvs/silkaj-58dUTebQ-py3.7/lib64/python3.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/moul/.cache/pypoetry/virtualenvs/silkaj-58dUTebQ-py3.7/lib64/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/moul/.cache/pypoetry/virtualenvs/silkaj-58dUTebQ-py3.7/lib64/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/moul/silkaj/silkaj/tools.py", line 70, in wrapper
    return loop.run_until_complete(f(*args, **kwargs))
  File "/usr/lib64/python3.7/asyncio/base_events.py", line 583, in run_until_complete
    return future.result()
  File "/home/moul/silkaj/silkaj/commands.py", line 283, in list_blocks
    idty = await identity_of(issuer["pubkey"])
  File "/home/moul/silkaj/silkaj/wot.py", line 209, in identity_of
    raise DuniterError(e)
  File "/home/moul/.cache/pypoetry/virtualenvs/silkaj-58dUTebQ-py3.7/lib64/python3.7/site-packages/duniterpy/api/errors.py", line 12, in __init__
    super().__init__("Error code {0} - {1}".format(data["ucode"], data["message"]))
TypeError: 'DuniterError' object is not subscriptable
ERROR:asyncio:Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f81a89a9c90>
ERROR:asyncio:Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7f81a5acb0c0>, 2501453.441665225)]']
connector: <aiohttp.connector.TCPConnector object at 0x7f81a5acab50>
  • Generic function to generate the same identity card:

    • wot/identity-of first
    • if the not-member exception got raised: wot/lookup, and generate the same kind of identity card
  • tx_history.py

  • commands.py: net, blocks

  • wot.py: id (change call)

Edited Feb 19, 2020 by Moul
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
0.9.0
Milestone
0.9.0
Assign milestone
Time tracking
None
Due date
None
Reference: clients/python/silkaj#297