brndnmtthws / tweet-delete

Self-destructing Tweets so you too can be cool 😎
MIT License
95 stars 13 forks source link

TypeError: '<=' not supported between instances of 'NoneType' and 'int' #90

Closed skipsta closed 2 years ago

skipsta commented 2 years ago

Hi. I'm using your docker image, and the container stops within a few seconds. The most recent lines in the log are as follows:

File "/app/tweet_delete/main.py", line 17, in validate_duration, if seconds <= 0:, TypeError: '<=' not supported between instances of 'NoneType' and 'int'

brndnmtthws commented 2 years ago

You need to pass the --delete_older_than parameter, although that's a bug in that it should provide a more meaningful message rather than blowing up.

skipsta commented 2 years ago

Thanks for the quick reply. I have this as my entrypoint on docker:

poetry run tweet-delete --consumer_key=XXXX --consumer_secret=XXXX --access_token_key=XXXX --access_token_secret=XXXX --delete_older_than="7 days" --delete_everything_after=2019-01-01 --minimum_engagement=1

Have I gone wrong somewhere?

EDIT: I have gone wrong somewhere! I've removed the " " around 7 days and it's happy now! Thanks again for your help :)

skipsta commented 2 years ago

Hi @brndnmtthws. I'm not getting an error anymore having sorted out my --delete-older-than parameter. But the logs get as far as:

'👉 tweets older than 5 days will be deleted 👈, 👉 only tweets created after 2022-01-01 00:00:00 will be deleted 👈, 👉 favorites will NOT be deleted 👈, 🦅 off we go 🦅, checking for tweets, starting from last_max_id=None'

But nothing happens after that. Is it waiting for a defined period? Or have I done something else wrong in my configuration?

brndnmtthws commented 2 years ago

There could be something else wrong, but twitter banned my developer account so I don't really have a way to test anymore. I guess they considered me too much of a "bot" for their liking. I'm afraid you're on your own.