You are viewing a single comment's thread from:

RE: Making a Steemit Bot Part 4: Stalking

in #steem-python6 years ago (edited)

I think I found the pretty serious bug in your code.

Here is the plan for our bot, it will (every block) check to see if the account has any funds to withdraw and if there are funds then it will withdraw them.

First program check Ned's account. This works as intended and yes, there are sufficient funds for drawing.
But when you are drawing, it does not come from Ned's account?!? Pretty sloppy coding if you ask me...

(lol couldn't resist) ;-)

Sort:  

So it isn't a bug at all as you can see with the withdraw method

s.claim_reward_balance(account=Account)

it will instead throw an interrupt exception if the account does not match the keys. This should be surrounded with a try and except. In the second of the tutorials I went over try and except and am expecting others to be able to try out and find where to use these on their own, if that makes sense.

Anyways a bug would mean that the program would do something unexpected and in reality it would be expected that the program gets interrupted.

I could use the steembase modules to actually get the account name from the private key but I would prefer to introduce things simplistically now and later use the more complex methods (that have next to no documentation).

No, I'm sorry, it was a joke.
I was joking that there is plenty of funds in Ned's account for drawing, but I can't draw any of it toward my account. Just having fun, sorry for misunderstanding.

You are doing a great job showing how to use Python and Steem(), thanks for sharing!
I'm up-voting your posts and saving them for when i will start working on my next project. Looking forward for your next posts!

Don't be sorry, its just if others were to follow this as a tutorial in the future and someone thought there was a bug it would be better for an explanation to be present then and there. I figured it was a joke with your last line:

(lol couldn't resist) ;-)

I hope you understand why my answer was as it was?

Gotcha :-)

Yes, you are correct, while joking I was potentially misleading others, bad joke.

No, it is actually in some ways good that it was brought in case people wonder about that in the future. Bad jokes are jokes that just aren't funny and cause harm, because there was an explanation after the joke (which destroys it, I am sorry) it can work towards being educational.

Coin Marketplace

STEEM 0.28
TRX 0.13
JST 0.033
BTC 67205.80
ETH 3112.68
USDT 1.00
SBD 3.71