Skip to content

Refactor to use slackclient in place of slacker#38

Open
cekees wants to merge 1 commit intozach-snell:masterfrom
cekees:use_slackclient
Open

Refactor to use slackclient in place of slacker#38
cekees wants to merge 1 commit intozach-snell:masterfrom
cekees:use_slackclient

Conversation

@cekees
Copy link
Copy Markdown

@cekees cekees commented Aug 12, 2020

In case it's useful... I replaced the calls to slacker with calls to slackclient and use the conversations API to https://python-slackclient.readthedocs.io/en/latest/conversations.html. I also found some minor string processing issues in python 3.8 on a mac.

@jonmchan
Copy link
Copy Markdown

This is indeed useful for getting around the deprecated API calls issue, but the export generated with this codebase no longer is compatible with slack-export-viewer.

 slack-export-viewer -z 20200816-195413-slack_export/
Archive already extracted. Viewing from slack-export/20200816-195413-slack_export...
Traceback (most recent call last):
  File "/usr/local/bin/slack-export-viewer", line 8, in <module>
    sys.exit(main())
  File "/Library/Python/2.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/Library/Python/2.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/Library/Python/2.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Library/Python/2.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/Library/Python/2.7/site-packages/slackviewer/main.py", line 61, in main
    configure_app(app, archive, channels, no_sidebar, no_external_references, debug)
  File "/Library/Python/2.7/site-packages/slackviewer/main.py", line 29, in configure_app
    top.mpim_users = reader.compile_mpim_users()
  File "/Library/Python/2.7/site-packages/slackviewer/reader.py", line 108, in compile_mpim_users
    mpim_members = {"name": mpim["name"], "users": [self.__USER_DATA[m] for m in mpim["members"]]}
KeyError: 'members'

Any ideas to fix this?

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

Successfully merging this pull request may close these issues.

2 participants