account.has_voted throws AttributeError
I am a fan of the steem-python library, and I think there is a bug in the has_voted method of the account class.
See this code:
from steem.account import Account
import sys
try:
account = Account("justyy")
if account.has_voted("@justyy/cn--2017-11-17"):
print('voted already by has_voted')
except:
print("Unexpected error:", sys.exc_info()[0])
Let's run it using python3 test.py
assuming above script is saved to test.py
It will always throws the unexpected error - attribute error
which basically makes the method unusable.
The source code is at 136-138 of the official steem-python github page:
https://github.com/steemit/steem-python/blob/master/steem/account.py
Open Source Contribution posted via Utopian.io
Thank you for the contribution. It has been approved.
You can contact us on Discord.
[utopian-moderator]
Thank you, that is super efficient!
Hey @justyy I am @utopian-io. I have just upvoted you at 15% Power!
Achievements
Did you know?
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x