psobot / keynote-parser

A packer/unpacker for Apple Keynote presentation files.
158 stars 17 forks source link

keynote-parser does not know how to parse Protobuf message type 4009 #13

Closed kortenkamp closed 4 years ago

kortenkamp commented 4 years ago

Unpacking a rather large keynote document created with the current version of Keynote (v10.0 of April 2020) leads to

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/keynote_parser/codec.py", line 135, in from_buffer
    klass = ID_NAME_MAP[message_info.type]
KeyError: 4009

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/keynote-parser", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/site-packages/keynote_parser/command_line.py", line 123, in main
    args.func(**vars(args))
  File "/usr/local/lib/python3.7/site-packages/keynote_parser/command_line.py", line 22, in unpack_command
    replacements=parse_replacements(**kwargs))
  File "/usr/local/lib/python3.7/site-packages/keynote_parser/file_utils.py", line 228, in process
    raise e
  File "/usr/local/lib/python3.7/site-packages/keynote_parser/file_utils.py", line 226, in process
    on_replace)
  File "/usr/local/lib/python3.7/site-packages/keynote_parser/file_utils.py", line 161, in process_file
    file = IWAFile.from_buffer(contents)
  File "/usr/local/lib/python3.7/site-packages/keynote_parser/codec.py", line 34, in from_buffer
    chunk, data = IWACompressedChunk.from_buffer(data)
  File "/usr/local/lib/python3.7/site-packages/keynote_parser/codec.py", line 93, in from_buffer
    archive, data = IWAArchiveSegment.from_buffer(data)
  File "/usr/local/lib/python3.7/site-packages/keynote_parser/codec.py", line 139, in from_buffer
    str(message_info.type))
NotImplementedError: Don't know how to parse Protobuf message type 4009

I am not sure whether the pip3-installed version of keynote-parser is the most recent one, as there is no way to find out a version number of keynote-parser.

kortenkamp commented 4 years ago

Apparently this has been fixed already, but pip3 install just installed an earlier version of keynote-parser.