Skip to content

pyonenote not working from the command line #21

Open
@Coniferish

Description

I installed pyonenote via pip install pyonenote and tried running pyonenote -f example-docs/QuickNotes.one and got the following error:

Traceback (most recent call last):
  File ".../pyonenote", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File ".../site-packages/pyOneNote/Main.py", line 97, in main
    sys.exit("File: %s doesn't exist", args.file)
TypeError: exit expected at most 1 argument, got 2

I also tried cloning the repo, changing the sys.exit line to and f-string, but still got an error:

$ python Main.py -f QuickNotes.one
Traceback (most recent call last):
  File ".../pyOneNote/pyOneNote/Main.py", line 104, in <module>
    main()
  File ".../pyOneNote/pyOneNote/Main.py", line 100, in main
    process_onenote_file(file, args.output_dir, args.extension, args.json)
  File ".../pyOneNote/pyOneNote/Main.py", line 28, in process_onenote_file
    document = OneDocment(file)
               ^^^^^^^^^^^^^^^^
  File ".../pyOneNote/lib/python3.11/site-packages/pyOneNote/OneDocument.py", line 11, in __init__
    self.root_file_node_list = FileNodeList(file, self, self.header.fcrFileNodeListRoot)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../pyOneNote/lib/python3.11/site-packages/pyOneNote/FileNode.py", line 16, in __init__
    file.seek(file_chunk_reference.stp)
ValueError: cannot fit 'int' into an offset-sized integer

Activity

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

Metadata

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions