Skip to content

Parsing a OneNote section fails on ArrayOfPropertyValues and an unknown FileNode #34

Description

@ajtorrens

Description

I’m using pyOneNote to parse a local .one section file from OneNote for Mac. The section opens successfully in OneNote, but parsing it with the installed pyOneNote command-line tool fails before extracting content.

Running the parser directly produces:

File "pyOneNote/FileNode.py", line 641, in __init__
  raise NotImplementedError('ArrayOfPropertyValues is not implement')
NotImplementedError: ArrayOfPropertyValues is not implement

I also tried the section with onenote-exporter (https://github.com/strick-j/onenote-exporter, commit 2dc051d). That project contains a local workaround for ArrayOfPropertyValues, so it gets further. It then fails with:

File "pyOneNote/FileNode.py", line 181, in __init__
  self.children.append(FileNodeList(file, self.document, self.data.ref))
AttributeError: 'FileNode' object has no attribute 'data'

Tracing the exporter failure locally showed an unknown FileNode ID (0x1D7) with baseType == 2 in the Meetings section. A second section from the same notebook fails similarly on unknown node ID 0x13D, also with baseType == 2. Both sections fail when tested individually. The standalone pyOneNote command above was run against the Meetings section; I have not confirmed whether it produces the same ArrayOfPropertyValues error on the second section.

This appears related to [issue #4](#4), which reports the same missing-data AttributeError while following a child FileNodeList. I understand that issue is closed, but the exporter comparison still encounters this failure. The ArrayOfPropertyValues error may be a separate unsupported case.

Could you advise whether these structures are supported in a newer version, or whether this indicates a parser bug? I can investigate a fix, but I have not tried skipping unknown nodes because that could silently omit referenced content.

Reproduction

I can reproduce this locally with pyOneNote 0.0.2 and a OneNote for Mac backup section, but I cannot provide the file publicly because it contains sensitive information.

This produces the ArrayOfPropertyValues traceback above. The missing-data traceback was observed separately when running onenote-exporter with its local workaround.

Environment

  • macOS Tahoe 26.7
  • Python 3.12
  • pyOneNote 0.0.2
  • onenote-exporter commit 2dc051d for the comparison run

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions