hfaran / slack-export-viewer

A Slack Export archive viewer that allows you to easily view and share your Slack team's export
https://pypi.python.org/pypi/slack-export-viewer
MIT License
939 stars 194 forks source link

error with compile_dm_users #58

Closed a-zndr closed 6 years ago

a-zndr commented 6 years ago

Exported today cannot get this to work from zip

running

sudo slack-export-viewer -z /Users/<usr>/Downloads/<domain>\ Slack\ export\ Apr\ 2\ 2018.zip

errors

Traceback (most recent call last):
  File "/usr/local/bin/slack-export-viewer", line 9, in <module>
    load_entry_point('slack-export-viewer==0.4.2', 'console_scripts', 'slack-export-viewer')()
  File "/Library/Python/2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Library/Python/2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Library/Python/2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Library/Python/2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/Library/Python/2.7/site-packages/slackviewer/main.py", line 76, in main
    configure_app(app, archive, debug)
  File "/Library/Python/2.7/site-packages/slackviewer/main.py", line 43, in configure_app
    dm_users = compile_dm_users(path, user_data, dm_data, empty_dms)
  File "/Library/Python/2.7/site-packages/slackviewer/archive.py", line 98, in compile_dm_users
    user2 = user_data[dm["members"][1]]
KeyError: u'U7E7Z0YTB'
hfaran commented 6 years ago

@tscritch this code was added by you. There are no comments indicating exactly what this function does and why and how. Could you shed some insight? (And add some comments for this).

a-zndr commented 6 years ago

Thanks for following up @hfaran

tscritch commented 6 years ago

Could be that the user doesn't exist. I'll take a look and comments as soon as I can. Sorry about that!

hfaran commented 6 years ago

Resolved by #60