kfei / slack-cleaner

:speech_balloon: Bulk delete messages and files on Slack
MIT License
1.24k stars 144 forks source link

AttributeError: 'dict' object has no attribute 'iteritems' #85

Open ShivamPokhriyal opened 4 years ago

ShivamPokhriyal commented 4 years ago

I'm trying to delete a 1-1 chat.

Delete all messages from a direct message channel

slack-cleaner --token --message --direct sherry --user johndoe

It's giving me this error: AttributeError: 'dict' object has no attribute 'iteritems'

Here is the full stacktrace

File "/Users/shivampokhriyal/Documents/Anaconda/anaconda3/bin/slack-cleaner", line 10, in <module>
    sys.exit(main())
  File "/Users/shivampokhriyal/Documents/Anaconda/anaconda3/lib/python3.7/site-packages/slack_cleaner/cli.py", line 337, in main
    message_cleaner()
  File "/Users/shivampokhriyal/Documents/Anaconda/anaconda3/lib/python3.7/site-packages/slack_cleaner/cli.py", line 286, in message_cleaner
    _channel_id = get_direct_id_by_name(args.direct_name)
  File "/Users/shivampokhriyal/Documents/Anaconda/anaconda3/lib/python3.7/site-packages/slack_cleaner/cli.py", line 244, in get_direct_id_by_name
    _user_id = get_user_id_by_name(name)
  File "/Users/shivampokhriyal/Documents/Anaconda/anaconda3/lib/python3.7/site-packages/slack_cleaner/cli.py", line 224, in get_user_id_by_name
    for k, v in user_dict.iteritems():
AttributeError: 'dict' object has no attribute 'iteritems'
sgratzl commented 4 years ago

can you try https://github.com/sgratzl/slack-cleaner it should be compatible with python 3