Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: argument of type 'NoneType' is not iterable #43

Open
ammario opened this issue Apr 9, 2020 · 3 comments
Open

TypeError: argument of type 'NoneType' is not iterable #43

ammario opened this issue Apr 9, 2020 · 3 comments

Comments

@ammario
Copy link

ammario commented Apr 9, 2020

root@bot:~/slack-autoarchive# docker run -e SLACK_TOKEN=xxxxx autoarchive
2020-04-09 23:40:35,604 - INFO - THIS IS A DRY RUN. NO CHANNELS ARE ACTUALLY ARCHIVED.
.Traceback (most recent call last):
  File "slack_autoarchive.py", line 253, in <module>
    CHANNEL_REAPER.main()
  File "slack_autoarchive.py", line 241, in main
    channel_disused = self.is_channel_disused(
  File "slack_autoarchive.py", line 152, in is_channel_disused
    (last_message_datetime, is_user) = self.get_last_message_timestamp(
  File "slack_autoarchive.py", line 124, in get_last_message_timestamp
    if 'messages' not in channel_history:
TypeError: argument of type 'NoneType' is not iterable

Same happens when calling script directly.

@Dextro
Copy link

Dextro commented Apr 21, 2020

Slack API: Applications

You need to use OAuth Access Token and not Bot User OAuth Access Token.

@ammario
Copy link
Author

ammario commented Apr 23, 2020

Screen Shot 2020-04-23 at 1 48 44 PM

All I see is the one.

@jonathanchan
Copy link

@ammario if you're still running getting a NoneType error, try my update - https://github.com/jonathanchan/slack-autoarchive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants