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: 'NoneType' object has no attribute '__getitem__' #46

Closed
dougr-code opened this issue Jun 18, 2020 · 5 comments
Closed

TypeError: 'NoneType' object has no attribute '__getitem__' #46

dougr-code opened this issue Jun 18, 2020 · 5 comments

Comments

@dougr-code
Copy link

First off, thank you so much for this, awesome idea. I'm encountering the issue below as was hoping you had an idea for a fix.

SLACK_TOKEN=xxxxxxx python slack_autoarchive.py
2020-06-18 13:12:27,331 - INFO - THIS IS A DRY RUN. NO CHANNELS ARE ACTUALLY ARCHIVED.
Traceback (most recent call last):
File "slack_autoarchive.py", line 253, in
CHANNEL_REAPER.main()
File "slack_autoarchive.py", line 235, in main
for channel in self.get_all_channels():
File "slack_autoarchive.py", line 108, in get_all_channels
payload=payload)['channels']
TypeError: 'NoneType' object has no attribute 'getitem'

@alexeiser
Copy link

Until #45 gets merged. You can use my fork which is updated to the new slack tokens required if you created the slack project in the last 2 weeks.

@dougr-code
Copy link
Author

Fantastic! Thank you! Using your fork worked.

Now I just need to figure out why it only pulls 8 channels out of hundreds even when I set days inactive and min participants both to 0.

@dougr-code
Copy link
Author

Thank you, alexeiser.

@alexeiser
Copy link

Probably because of paging...
imduffy15@52ceb23
I have merged grailbio-external#3 to address it.

@alexeiser
Copy link

Oh - and adding the bot tends to add a message which resets your archiving clock....

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

2 participants