slack-export-viewer
slack-export-viewer copied to clipboard
KeyError when pointing viewer to .zip
I keep getting the following error and trace when I try to open the export viewer: Traceback (most recent call last):
File "/usr/local/bin/slack-export-viewer", line 10, in
the window doesn't open at any point, but the process continues for a while before it crashes.
Can you add a breakpoint on this line and see what __USER_DATA contains? Looks like for some reason that name isn't populated in the dictionary with that ID.
What do you mean by "add a breakpoint on this line"? I'm assuming I'm not just navigating to the user data directory path.
A colleague of mine tried it with a new install of the viewer, and ended up getting the same error as I did.
Same error as above.
I am having the same issue. The cause of the KeyError (for us) is that the user in question is not with our organization and an outside consultant. Therefore they are single channel and not in our users.json
The issue then appears to be that, since the mpims.json has an invalid user, the program fails.
I confirmed/worked around this by doing the following:
- Note the KeyError. Ex. U0001112
- Decompress the file from Slack export
- Edit mpims.json and search U0001112 and delete its references
- Save the file
- Compress all of the dump as a new zip file
- Run the tool against the new zip.
- If it works, Profit! BUT if it fails, repeat steps 1-6. I only have to delete two users that were causing the KeyError and then it works.
I imagine it just needs a way, in the reader.py, to gracefully continue if a KeyError is experienced.