question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Numbers 11.2 Support

See original GitHub issue

Unable to read a Numbers file without throwing an error on Numbers 11.2:

>>> from numbers_parser import Document
>>> doc = Document('numbers-test.numbers')
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/numbers_parser/iwafile.py", line 148, in from_buffer
    klass = ID_NAME_MAP[message_info.type]
KeyError: 6372

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/numbers_parser/iwafile.py", line 25, in from_buffer
    chunk, data = IWACompressedChunk.from_buffer(data, filename)
  File "/usr/local/lib/python3.9/site-packages/numbers_parser/iwafile.py", line 84, in from_buffer
    archive, data = IWAArchiveSegment.from_buffer(data, filename)
  File "/usr/local/lib/python3.9/site-packages/numbers_parser/iwafile.py", line 150, in from_buffer
    raise NotImplementedError(
NotImplementedError: Don't know how to parse Protobuf message type 6372

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/numbers_parser/unpack.py", line 62, in _extract_iwa_archives
    iwaf = IWAFile.from_buffer(contents, filename)
  File "/usr/local/lib/python3.9/site-packages/numbers_parser/iwafile.py", line 31, in from_buffer
    raise ValueError("Failed to deserialize " + filename) from e
ValueError: Failed to deserialize Index/CalculationEngine-860970.iwa

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.9/site-packages/numbers_parser/document.py", line 35, in __init__
    self._object_store = ObjectStore(filename)
  File "/usr/local/lib/python3.9/site-packages/numbers_parser/containers.py", line 54, in __init__
    read_numbers_file(path,
  File "/usr/local/lib/python3.9/site-packages/numbers_parser/unpack.py", line 35, in read_numbers_file
    _get_objects_from_zip_stream(zipf, handler, store_objects)
  File "/usr/local/lib/python3.9/site-packages/numbers_parser/unpack.py", line 51, in _get_objects_from_zip_stream
    _extract_iwa_archives(contents, filename, handler, store_objects)
  File "/usr/local/lib/python3.9/site-packages/numbers_parser/unpack.py", line 64, in _extract_iwa_archives
    raise FileFormatError(f"{filename}: invalid IWA file {filename}") from e
NameError: name 'FileFormatError' is not defined
>>>

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
masacciocommented, Nov 20, 2021

@tsouchlarakis apologies for not spotting your original issue – don’t know what happened there that I didn’t see it.

Version 2.1 includes protos extracted from Numbers 11.2 and includes the ID (6372) that throws an exception for you. Can you try the latest from PyPI?

1reaction
masacciocommented, Nov 20, 2021

There are two problems here: I’ve not imported FileFormatError (a trivial fix); and 11.2 has introduced some new Protobuf types, which requires a re-dump of the definitions. I am half-way through 11.2 support not helped by latest protobuf seg-faulting Python for me. Will look this weekend after I’ve built a clean environment to see if it’s really a protobuf vs. Python problem

Read more comments on GitHub >

github_iconTop Results From Across the Web

What's new in Numbers for Mac - Apple Support
New in Numbers 11.2 for Mac. Use pivot tables to quickly summarize, group, and rearrange data to explore patterns and trends with pivot ......
Read more >
Download Numbers for Mac | MacUpdate
Download the latest version of Numbers for Mac for free. ... Numbers. Version 12.2.1. Apple's spreadsheet app from the iWork suite. ... Version:...
Read more >
Keynote, Pages, Numbers 11.2 updates with new ...
Apple has released updates for its iWork suite, with version 11.2 of each on macOS, iOS, and iPadOS including a number of changes,...
Read more >
Numbers (spreadsheet) - Wikipedia
Numbers is a spreadsheet application developed by Apple Inc. as part of the iWork ... The app was later updated to support iPhone...
Read more >
Enterprise Performance Management (EPM) 11.2.11 is ...
Beginning with Release 11.2.11, the version numbers are displayed in "11.2.11.0.000" format under Help > About Oracle Enterprise Performance ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found