python-steem is not compatible with 19.4 (appbase).

in #utopian-io6 years ago (edited)

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)

appbasetest.timcliff.com

  • Browser: N/A
  • Operating system: Linux

Recording Of The Bug

If the bug can be recorded on screen, please provide a short video or an animated GIF, otherwise delete this section.



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

@leprechaun, Approve is not my ability, but I can upvote you.

Thanks. I appreciate that.

If anyone can tell me how to do unit testing in steem-python, please let me know here.

I have over 200 unit tests in https://github.com/holgern/beem. beem is already appbase ready. Maybe my code is a starting point...

Nice! I hate when the foundations I build stuff on shift! Now that it is going to happen it's great that there is a library that is already ready for it. How do I run the unit tests in your project?

Your contribution cannot be approved because it does not follow the Utopian Rules.

  • I do not think it a bug of steem-python. Obviously it should be the https://appbasetest.timcliff.com node bug
  • I havae checked steem-python and tested for a long time on your "bug" .If you find some more detail , send a DM to m in Discord .Thanks!

You can contact us on Discord.
[utopian-moderator]

Coin Marketplace

STEEM 0.19
TRX 0.14
JST 0.030
BTC 59876.72
ETH 3191.77
USDT 1.00
SBD 2.43