Skip to content
This repository has been archived by the owner on Feb 3, 2022. It is now read-only.

AttributeError: 'list' object has no attribute 'get' #13

Open
jadechip opened this issue May 2, 2021 · 1 comment
Open

AttributeError: 'list' object has no attribute 'get' #13

jadechip opened this issue May 2, 2021 · 1 comment

Comments

@jadechip
Copy link

jadechip commented May 2, 2021

RPC for sending transactions results in the following error. It appears it tries to access a property that does not exists: here

[2021-05-01 21:34:58 +0000] [10] [ERROR] Error handling request /casa/nodes/thumbprints
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/sync.py", line 135, in handle
    self.handle_request(listener, req, client, addr)
  File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/sync.py", line 176, in handle_request
    respiter = self.wsgi(environ, resp.start_response)
  File "/usr/local/lib/python3.7/site-packages/falcon/api.py", line 269, in __call__
    responder(req, resp, **params)
  File "/home/substrate-api/app/app/resources/jsonrpc.py", line 128, in on_post
    self.substrate.request_id = req.media.get('id')
AttributeError: 'list' object has no attribute 'get'
@AliHaider20
Copy link

As per what I see you're trying to get the value of the id key. But the req. media is a list so if you've to access the index of id it should be req.media.index("id").

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

No branches or pull requests

2 participants