masaccio / numbers-parser

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

RuntimeWarning: unsupported version '10.1.8' #81

Closed Morg42 closed 7 months ago

Morg42 commented 7 months ago

When trying to open a self-created document, the error RuntimeWarning: unsupported version '10.1.8' is raised.

To Reproduce doc = Document("test.numbers")

Expected behavior Opening the document.

Additional information Installed numbers version is 10.1. As far as I can see, this numbers version is not tested. Is there a way to try and import the document?

masaccio commented 7 months ago

It's just a warning (I don't have any 10.1 documents) but it will very likely work.

Morg42 commented 7 months ago

No, the warning comes before this. This is an error, which breaks execution of the code.

masaccio commented 7 months ago

That is definitely a warning that's being generated so it should not throw an exception. The standard way to ignore warnings is:

import warnings

with warnings.catch_warnings():
    warnings.filterwarnings("ignore", category=RuntimeWarning)
    from numbers_parser import Document

I could add 10.1.x as a supported version though I don't know for sure it will work (it is very unlikely that it will fail) but it's getting pretty old now. If you want me to do this, I'll need a simple document create with this version of Numbers for testing.

Morg42 commented 7 months ago

Sorry, you're right - it throws 2 warnings, and I didn't recognize the second to be a warning also...

If you want, you can test, but now seeing that it does work, it's not a priority for me. I'll keep working, and if I run into problems, we can try to work on it.

Thanks!