steemit / steem-python

The official Python (3) library for the Steem Blockchain.
https://steem.io
MIT License
154 stars 100 forks source link

What is an archived post? #150

Closed kirkins closed 6 years ago

kirkins commented 6 years ago

I'm trying to have a bot vote on posts of certain users.

I keep getting an exception about not being able to vote on archived posts.

I'm searching google and I can't find anything about what is an archived post on Steem.

Can someone explain the code block below:

        # Test if post is archived, if so, voting is worthless but just
        # pollutes the blockchain and account history
        if self.get('net_rshares', None) == None:
            raise VotingInvalidOnArchivedPost
        return self.commit.vote(self.identifier, weight, account=voter)

https://github.com/steemit/steem-python/blob/master/steem/post.py#L247-L251

cyon1c commented 6 years ago

Currently, an "archived" post is one which is older than 7 days, and can no longer be voted on. Are these posts you are trying to vote on within the 7 day range, or older?

kirkins commented 6 years ago

No apparently the code I posted is the fixed version but it isn't on pip.

kirkins commented 6 years ago

Closing as issue is open for that here https://github.com/steemit/steem-python/issues/27