steemit / steem-python

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

Compatibility with 19.4 #164

Closed shawnpringle closed 6 years ago

shawnpringle commented 6 years ago

Expected behavior

Steem-python should be able to work with the new 19.4 hard fork before the hard fork happens so programs that rely on steem-python can be tested against it.

Actual behavior

steem-python attemps to use the 'database_api' and does not failover to a 'condenser_api' call, which could be handled in various little try/except blocks.

This is what happens when get_account_history() is called:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File ".../development/steem-python/steem/steemd.py", line 621, in get_account_history
    api='database_api')
  File ".../development/steem-python/steembase/http_client.py", line 216, in call
    return_with_args=return_with_args)
  File ".../development/steem-python/steembase/http_client.py", line 236, in _return
    raise RPCError(error_message)
steembase.exceptions.RPCError: Assert Exception:method_itr != api_itr->second.end(): Could not find method get_account_history

How to reproduce

Testing can begin against 19.4 with the public rpc node mentioned in the following article https://steemit.com/steem/@timcliff/new-appbase-19-4-rpc-node-online-for-appbase-testing-appbasetest-timcliff-com

Example: Run python3 and issue the following commands:

>>> from steem.steem import Steem
>>> steem = Steem(nodes=['appbasetest.timcliff.com'])
>>> steem.get_account_history('steemfiles', index_from=1, limit=0)

See Also

The cononical link is: https://utopian.io/utopian-io/@leprechaun/python-steem-is-not-compatible-with-19-4-appbase
See Also: This was originally posted by myself as https://utopian.io/utopian-io/@leprechaun/python-steem-is-not-compatible-with-19-4-appbase