obsidianmd / obsidian-importer

Obsidian Importer lets you import notes from other apps and file formats into your Obsidian vault.
https://help.obsidian.md/import
MIT License
619 stars 53 forks source link

[OneNote] Failed: "Exported image 20240530020006-284.png" because TypeError [ERR_INVALID_ARG_TYPE] #257

Open agowa opened 1 month ago

agowa commented 1 month ago

Hi, I tried the OneNote importer again and this time it failed to import pictures using a TypeError.

This is the log I got. I removed a bunch of the duplicates (indicated by the lines) as it was over 1000 lines and most were identical except for the file name.

Failed: "Exported image 20240530020010-7.png" because TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer...
Failed: "Übung 00" because TypeError: Cannot read properties of undefined (reading 'split')Failed: "Exported image 20240530020010-6.png" because TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer...
Failed: "2018_Kapitel1.pdf" because TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer...
Failed: "Exported image 20240530020010-8.png" because TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer...
Failed: "Exported image 20240530020008-12.png" because TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer...
Failed: "Exported image 20240530020008-10.png" because TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer...
Failed: "Übung 00 - Lösung" because TypeError: Cannot read properties of undefined (reading 'split')Failed: "Exported image 20240530020010-7.png" because TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer...
Failed: "Exported image 20240530020022-0.png" because TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer...
<truncatted, 17 identical (but with different file name) ones like in the previous line>
Failed: "Übung 02" because TypeError: Cannot read properties of undefined (reading 'split')Failed: "uebung01.pdf" because TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer...
Failed: "Exported image 20240530020022-3.png"  because TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer...
<truncatted about 870 more of the same error as in the previous line>

I don't know if it is related to this bug or another issue, however it also failed to put the pages at the correct locations. It started fine with OneNote => NoteBookName => Category => Sub-category => Sub-Sub-category => Page, but others it put directly below the root (outside of the OneNote folder I selected for the import).

Edit: It is related. The stuff it put outside of the OneNotes folder is all of the files it complained about in the log. It created a folder with the name "OneNotePageName.md" (yes .md for the foldername) for the onenotepage and put the PDFs and PNG files below it as e.g. "Exported image 20240530020007-22.png"

Edit2: And it stopped not even half way through the import. Is there a rate limit for how many errors it can produce before aborting the run? If not this may be another issue.

mattsmithuk commented 1 week ago

I've been having similar issues using importer 1.6.3 I don't seem to be having the issues with the way notes are organised into folders though

Failed: "Exported image 20240619092733-0.png" because TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer...
Failed: "Exported image 20240619092733-1.png" because TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer...
Failed: "Exported image 20240619092733-2.png" because TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer...
Failed: "Mitochondria at the extremes" because TypeError: Cannot read properties of undefined (reading 'split')
Failed: "Exported image 20240619092733-0.png" because TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer...
Failed: "Avalanche Resus Checklist" because TypeError: Cannot read properties of undefined (reading 'split')
Failed: "O2 at Altitude" because TypeError: Cannot read properties of undefined (reading 'split')
Failed: "Exported image 20240619092733-1.png" because TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer...
Failed: "Penthrox" because TypeError: Cannot read properties of undefined (reading 'split')
Failed: "Improvised Cricothyroidotomy" because TypeError: Cannot read properties of undefined (reading 'split')
Failed: "Travel to High Altitude Following Solid Organ Transplant" because TypeError: Cannot read properties of undefined (reading 'split')
Failed: "Exported image 20240619092733-3.png" because TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer...
Failed: "Exported image 20240619092733-4.png" because TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer...
Failed: "Exported image 20240619092733-4.png" because TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer...
Failed: "DiMM Theory 2 10/05/2015" because TypeError: Cannot read properties of undefined (reading 'split')
Failed: "Hypothermia Guidelines" because TypeError: Cannot read properties of undefined (reading 'split')
Failed: "Exported image 20240619092733-5.png" because TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer...
Failed: "Exported image 20240619092729-8.jpeg" because TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer...
Failed: "Exported image 20240619092729-9.jpeg" because TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer...
Failed: "Exported image 20240619092729-10.jpeg" because TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer...
Failed: "Exported image 20240619092729-11.jpeg" because TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer...
Failed: "Exported image 20240619092729-12.jpeg" because TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer...
Failed: "Exported image 20240619092729-13.jpeg" because TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer...
Failed: "Exported image 20240619092729-14.jpeg" because TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer...
Failed: "Exported image 20240619092729-15.jpeg" because TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer...
Failed: "Exported image 20240619092729-16.jpeg" because TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer...
Failed: "Exported image 20240619092729-17.jpeg" because TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer...
Failed: "Exported image 20240619092729-20.jpeg" because TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer...
Failed: "Exported image 20240619092729-21.jpeg" because TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer...
Failed: "Exported image 20240619092729-22.jpeg" because TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer...
Failed: "Exported image 20240619092729-23.jpeg" because TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer...
Failed: "Exported image 20240619092729-24.jpeg" because TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer...
Failed: "Exported image 20240619092729-26.jpeg" because TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer...
Failed: "Exported image 20240619092729-27.jpeg" because TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer...
Failed: "Exported image 20240619092729-28.jpeg" because TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer...
Failed: "Exported image 20240619092729-29.jpeg" because TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer...
Failed: "Exported image 20240619092729-30.jpeg" because TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer...
Failed: "Exported image 20240619092729-31.jpeg" because TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer...