masaccio / numbers-parser

Python module for parsing Apple Numbers .numbers files
MIT License
208 stars 15 forks source link

TypeError: 'ItemsList' object is not callable #65

Closed traceymeng closed 1 year ago

traceymeng commented 1 year ago

Describe the bug After I updated to the latest build of 4.4.2, I got following error: sheets = doc.sheets() TypeError: 'ItemsList' object is not callable

To Reproduce Try to parse the attached numbers file with following code: doc = Document(args.filePath) sheets = doc.sheets()

Expected behavior A clear and concise description of what you expected to happen.

Attachments

TestFile.numbers.zip

Additional information Please provide the version number (output of cat-numbers --version 4.4.2

Add any other context about the problem here. I'm using Python 3.10.11

masaccio commented 1 year ago

You should have been seeing a deprecation warning for some time about sheets() which has been a property rather than a method since v3. I removed the method entirely in v4. You need to use doc.sheets and then sheet.tables.