Skip to content
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

KeyError: 'pretty_type' #11

Open
Xarlos89 opened this issue Apr 4, 2022 · 3 comments
Open

KeyError: 'pretty_type' #11

Xarlos89 opened this issue Apr 4, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@Xarlos89
Copy link

Xarlos89 commented Apr 4, 2022

Traceback (most recent call last):
File "C:\Users\USER\Desktop\slackchannel2pdf-1.0.0\slackchannel2pdf\run.py", line 196, in
main()
File "C:\Users\USER\Desktop\slackchannel2pdf-1.0.0\slackchannel2pdf\run.py", line 183, in main
exporter.run(
File "C:\Users\USER\Desktop\slackchannel2pdf-1.0.0\slackchannel2pdf\slackchannel2pdf.py", line 1585, in run
self._write_messages_to_pdf(document, messages, threads)
File "C:\Users\USER\Desktop\slackchannel2pdf-1.0.0\slackchannel2pdf\slackchannel2pdf.py", line 1216, in _write_messages_to_pdf
last_user_id = self._parse_message_and_write_to_pdf(
File "C:\Users\USER\Desktop\slackchannel2pdf-1.0.0\slackchannel2pdf\slackchannel2pdf.py", line 931, in _parse_message_and_write_to_pdf
+ file["pretty_type"]
KeyError: 'pretty_type'

@ErikKalkoken
Copy link
Owner

Thanks for opening the issue. Could you please provide an example of the message that is causing this error in JSON? Then I can try to recreate and fix this bug. You can do this with the argument --write-raw-data

See also our discussion in #3

@ErikKalkoken ErikKalkoken added the bug Something isn't working label Apr 4, 2022
@davidbsp
Copy link

Hi @ErikKalkoken, I'm also getting this bug. Here is the output of running the command with a token on a channel in my workspace:

Fetched a total of 10.000 messages from channel
Fetching messages from thread 1 - page 1
Fetched a total of 2 messages from 1 threads
Fetching names for 3 bots
Writing file: name .\SEMFIRE ISR-UC Perception Team_users.json
Writing file: name .\SEMFIRE ISR-UC Perception Team_bots.json
Writing file: name .\SEMFIRE ISR-UC Perception Team_channels.json
Writing file: name .\SEMFIRE ISR-UC Perception Team_usergroups.json
Writing file: name .\SEMFIRE ISR-UC Perception Team_fruc_cmu_portugal_mapping_path_planning_messages.json
Writing file: name .\SEMFIRE ISR-UC Perception Team_fruc_cmu_portugal_mapping_path_planning_threads.json
Traceback (most recent call last):
  File "run.py", line 196, in <module>
  File "run.py", line 191, in main
  File "slackchannel2pdf.py", line 1584, in run
  File "slackchannel2pdf.py", line 1219, in _write_messages_to_pdf
  File "slackchannel2pdf.py", line 934, in _parse_message_and_write_to_pdf
KeyError: 'pretty_type'
[3520] Failed to execute script run

Which of JSON files do you want me to send you?

@ErikKalkoken
Copy link
Owner

ErikKalkoken commented Nov 11, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants