You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Independent reproduction: applying this patch on top of main resolves NotImplementedError: ArrayOfPropertyValues is not implement on a corpus of real-world .one files. The shape used here — cproperties (uint32) followed by a PropertyID whose type is asserted to be 0x11, followed by cpropertiesPropertySet instances — matches [MS-ONESTORE] 2.6.6 prtArrayOfPropertyValues and successfully parses the files in question.
Two small observations on the diff that may be worth folding in (or doing as a follow-up):
The companion elif type == 0x11: branch a few lines below still calls PropertySet(file) without OIDs, OSIDs, ContextIDs, document, which trips a TypeError on inputs that exercise the singleton (non-array) variant. Updating that call to PropertySet(file, OIDs, OSIDs, ContextIDs, document) keeps it consistent with the array case implemented here.
The assert prid.type == 0x11 is technically what the spec requires, but downgrading to a soft warning + break would let parsing recover gracefully on slightly out-of-spec files instead of aborting the whole document.
Either way, this PR fixes a real, reproducible failure on a non-trivial number of files. Combined with #20 (FileNode.data initialization) and #26 (.hex() type safety), the three together cover the most common parser aborts on real-world OneNote backups.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tested on
5ad84c75b4a8825a4ee49fcb2ab895f0a51c9877fc4e50595fa1917ae1daa748(in VT), which contains this element.