steemit / steem-python

The official Python (3) library for the Steem Blockchain.
https://steem.io
MIT License
154 stars 100 forks source link

RPCError: transaction_expiration_exception when trying to upvote a post #256

Closed majidse closed 4 years ago

majidse commented 5 years ago

Version of Python you are running

3.6

Version of steem-python you are running

Name: steem Version: 1.0.1 Summary: Official python steem library. *Installed from github master branch

Expected Behavior

Trying to upvote a post using steem-python

Actual Behavior

getting this error even after 100 tries. Also tried different Nodes. No success

ERROR:steembase.http_client:Unexpected exception! Please report at https://github.com/steemit/steem-python/issues -- RPCError: transaction_expiration_exception from rpc.steemviz.com (4030100 transaction_expiration_exception: transaction expiration exception:) in broadcast_transaction

Steps to reproduce

from steem import Steem
import traceback
steem = Steem(nodes= ['rpc.buildteam.io'], keys= 'my posting key')
permlink = '@majidse/bodrum-2018-07-28-09-52-14'
while True:
    try:
       steem.vote(permlink,100, 'majidse')
       print ("Succesfully upvoted!")
    except Exception as e:
       continue
    else:
        break

Stack Trace

Traceback (most recent call last):
  File "pick.py", line 7, in <module>
    steem.vote(permlink,100, 'majidse')
  File "/usr/local/lib/python3.6/site-packages/steem-1.0.1-py3.6.egg/steem/commit.py", line 386, in vote
    return self.finalizeOp(op, account, "posting")
  File "/usr/local/lib/python3.6/site-packages/steem-1.0.1-py3.6.egg/steem/commit.py", line 134, in finalizeOp
    return tx.broadcast()
  File "/usr/local/lib/python3.6/site-packages/steem-1.0.1-py3.6.egg/steem/transactionbuilder.py", line 150, in broadcast
    raise e
  File "/usr/local/lib/python3.6/site-packages/steem-1.0.1-py3.6.egg/steem/transactionbuilder.py", line 148, in broadcast
    self.steemd.broadcast_transaction(self.json())
  File "/usr/local/lib/python3.6/site-packages/steem-1.0.1-py3.6.egg/steem/steemd.py", line 962, in broadcast_transaction
    api='network_broadcast_api')
  File "/usr/local/lib/python3.6/site-packages/steem-1.0.1-py3.6.egg/steembase/http_client.py", line 314, in call
    raise e
  File "/usr/local/lib/python3.6/site-packages/steem-1.0.1-py3.6.egg/steembase/http_client.py", line 289, in call
    raise RPCError(detail)
steembase.exceptions.RPCError: transaction_expiration_exception from None (4030100 transaction_expiration_exception: transaction expiration exception:) in broadcast_transaction
htotoo commented 5 years ago

I had the same problem, with similar environment. Tried multiple nodes, etc, nothing helped. After a while i figured out that the system time is wrong on my computer (late 10 minutes). After fixing it, the problem gone!