holgern/beem

RPCError: Invalid parameters

ak4728 opened this issue · 1 comments

I sometimes receive the following error when I try to get replies of the account.

---------------------------------------------------------------------------
RPCError                                  Traceback (most recent call last)
e:\Anaconda3\envs\mypython3\lib\site-packages\beemapi\steemnoderpc.py in rpcexec(self, payload)
     63                 # Forward call to GrapheneWebsocketRPC and catch+evaluate errors
---> 64                 reply = super(SteemNodeRPC, self).rpcexec(payload)
     65                 if self.next_node_on_empty_reply and not bool(reply) and self.nodes.working_nodes_count > 1:

e:\Anaconda3\envs\mypython3\lib\site-packages\beemapi\graphenerpc.py in rpcexec(self, payload)
    426             else:
--> 427                 raise RPCError(ret['error']['message'])
    428         else:

RPCError: Invalid parameters

During handling of the above exception, another exception occurred:

UnhandledRPCError                         Traceback (most recent call last)
<ipython-input-13-2198fbad56c8> in <module>()
      1 from beem.account import Account
      2 acc = Account("elektroyazilim")
----> 3 for comment in acc.comment_history(limit=10):
      4     print(comment)

e:\Anaconda3\envs\mypython3\lib\site-packages\beem\account.py in comment_history(self, limit, start_permlink, account)
   3045                           limit=query_limit, tag=account['name'])
   3046             results = Discussions_by_comments(query,
-> 3047                                               steem_instance=self.steem)
   3048             if len(results) == 0 or (start_permlink and len(results) == 1):
   3049                 return

e:\Anaconda3\envs\mypython3\lib\site-packages\beem\discussions.py in __init__(self, discussion_query, lazy, steem_instance)
    581         self.steem.rpc.set_next_node_on_empty_reply(self.steem.rpc.get_use_appbase())
    582         if self.steem.rpc.get_use_appbase():
--> 583             posts = self.steem.rpc.get_discussions_by_comments(discussion_query, api="tags")['discussions']
    584         else:
    585             posts = self.steem.rpc.get_discussions_by_comments(discussion_query)

e:\Anaconda3\envs\mypython3\lib\site-packages\beemapi\graphenerpc.py in method(*args, **kwargs)
    474                 query = self.rpc_queue
    475                 self.rpc_queue = []
--> 476             r = self.rpcexec(query)
    477             self.nodes.num_retries_call = stored_num_retries_call
    478             return r

e:\Anaconda3\envs\mypython3\lib\site-packages\beemapi\steemnoderpc.py in rpcexec(self, payload)
     84             except exceptions.RPCError as e:
     85                 try:
---> 86                     doRetry = self._check_error_message(e, self.error_cnt_call)
     87                 except exceptions.CallRetriesReached:
     88                     msg = exceptions.decodeRPCErrorMsg(e).strip()

e:\Anaconda3\envs\mypython3\lib\site-packages\beemapi\steemnoderpc.py in _check_error_message(self, e, cnt)
    151         #    doRetry = True
    152         elif msg:
--> 153             raise exceptions.UnhandledRPCError(msg)
    154         else:
    155             raise e

UnhandledRPCError: Invalid parameters

It throws this error sometimes though. In other times, it works without a problem. Is this because of something on my end?

This is caused by the set RPC node