For all the Steemit devs, if your Steem bot recently has started behaving wrong try to change the RPC node first.
Hey devs on Steemit,
I have been using @buildteam's RPC node(https://rpc.buildteam.io), thanks to the team, for my @krguidedog project. It's been great until yesterday, but KR Guidedog bot just got stuck due to a very weird problem.
I spent huge amount of time to figure out the main cause, and it turned out the post body and json_metadata are completely empty when I get a post by any "user/permlink" combinations. Tried lots of edge cases and all failed. As @krguidedog needs to check the tag in json_metadata of the post, it was just unable to work without the data.
I am using steem-python's Post module but basically it is using the light RPC internally so after digging into the problem I concluded that it was a problem of the RPC node.
I simply changed my RPC node to the other node (@gtg's one), and everything has come back to normal.
@buildteam, could you please check why there are such discrepancies in the response from your RPC?
Hope this helped you.
steemd RPC must return the body and json_metadata of a post
body and json_metadata are empty
How to reproduce
Using steem-python, set RPC node to:
steempy set nodes https://rpc.buildteam.io/
And run this code.
from steem.post import Post a = Post("@nowmacha/2gm8vp-and") print(a.export());
And run the code after changing your RPC node to another one:
steempy set nodes https://gtg.steem.house:8090
I put steemd's repository as I barely think @buildteam has forked steemd for their RPC node.
Posted on Utopian.io - Rewarding Open Source Contributors