You are viewing a single comment's thread from:

RE: Beempy post will create a new post, when changing the title in the yaml header, will fix this soon.

in LeoFinance3 years ago (edited)

Hello,

I'm encountering an error when calling blog.get_rewards() and blog.get_author_rewards() using version = '0.24.26', below would be the trace back.

Traceback (most recent call last):
  File "[path-removed]\Python\Python39\lib\threading.py", line 954, in _bootstrap_inner
    self.run()
  File "[path-removed]\Python\Python39\lib\threading.py", line 892, in run
    self._target(*self._args, **self._kwargs)
  File "[path-removed].py", line 83, in followers
    print(blog.get_curation_rewards())
  File "[path-removed]\lib\site-packages\beem\comment.py", line 569, in get_curation_rewards
    total_vote_weight += vote["weight"]
TypeError: unsupported operand type(s) for +=: 'int' and 'str'

I tried a workaround by casting vote["weight"] to int:

        total_vote_weight = 0
        for vote in active_votes_json_list:
            total_vote_weight += int(vote["weight"])