-
Notifications
You must be signed in to change notification settings - Fork 194
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
Execution fails with KeyError: 'replies' #121
Comments
Same issue here running python 2.7 and 3.6 |
Schema might have changed in the export - can you put a breakpoint there to see what keys are in the dictionary to figure out what it might have changed to? |
|
I changed line 199 to: |
the thread replies are no longer embedded in the messages themselves. they are now separate messages/blocks that are correlated via the |
While looking at this, I noticed what I think might another bug/potential bug: slack-export-viewer/slackviewer/reader.py Line 203 in af67f79
followed by slack-export-viewer/slackviewer/reader.py Line 210 in af67f79
The for loop goes through an list and inside the body of the loop elements are removed from the list. |
Running the viewer against our data export takes a bit of time, but eventually it exits with the following error:
pkaldis@anatomy ~/Desktop/Export --> slack-export-viewer -z data_export.zip
/var/folders/gt/f1j5l07n1zd6_3r_7rz6jgzc0001g1/T/_slackviewer/90d4e276bb39a4adce4ff381bf0ce8bef12e7bf6 already exists
Traceback (most recent call last):
File "/usr/local/bin/slack-export-viewer", line 11, in
sys.exit(main())
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 764, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python2.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/slackviewer/main.py", line 61, in main
configure_app(app, archive, channels, no_sidebar, no_external_references, debug)
File "/usr/local/lib/python2.7/site-packages/slackviewer/main.py", line 24, in configure_app
top.channels = reader.compile_channels(channels)
File "/usr/local/lib/python2.7/site-packages/slackviewer/reader.py", line 35, in compile_channels
return self._create_messages(channel_names, channel_data)
File "/usr/local/lib/python2.7/site-packages/slackviewer/reader.py", line 176, in _create_messages
chats = self._build_threads(chats)
File "/usr/local/lib/python2.7/site-packages/slackviewer/reader.py", line 199, in _build_threads
for reply in message._message['replies']:
KeyError: 'replies'
Any insights on how to troubleshooting this would be greatly appreciated.
Thank you!
The text was updated successfully, but these errors were encountered: