TypeError on some accounts when using .blog_history(reverse=x)
sisygoboom opened this issue · 0 comments
sisygoboom commented
acc.blog_history(limit=2, reblogs=False)
Is causing a TypeError on some accounts but not others. From lloking at the error message, it looks like it's something to do with the limit. Weirdly works on some accounts and fails on other accounts.
from beem.account import Account
def post_check(acc):
"""
Check that the account posts at least twice a week
"""
blog_history = acc.blog_history(limit=2, reblogs=False, account=acc.name)
last_post_age = 8
for post in blog_history:
last_post_age = post.time_elapsed().days
if last_post_age > float(7):
return False
return True
post_check(Account('ewefirst'))
Traceback (most recent call last):
File "<ipython-input-3-f3039e4df7e7>", line 1, in <module>
post_check(Account('ewefirst'))
File "<ipython-input-2-52c0aa8f595d>", line 5, in post_check
for post in blog_history:
File "C:\Users\chris\Anaconda3\lib\site-packages\beem\account.py", line 2976, in blog_history
limit=query_limit)
File "C:\Users\chris\Anaconda3\lib\site-packages\beem\account.py", line 757, in get_blog
Comment(c["comment"], steem_instance=self.steem) for c in ret
File "C:\Users\chris\Anaconda3\lib\site-packages\beem\account.py", line 757, in <listcomp>
Comment(c["comment"], steem_instance=self.steem) for c in ret
TypeError: string indices must be integers
post_check(Account('sisygoboom'))
Out[4]: False