theohbrothers / ConvertOneNote2MarkDown

Ready to make the step to Markdown and saying farewell to your OneNote, EverNote or whatever proprietary note taking tool you are using? Nothing beats clear text, right? Read on!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Com error E_FAIL during call to Get-OneNoteHierarchy

jazzay opened this issue · comments

Bug

When attempting to run this converter I get a Com error during call to Get-OneNoteHierarchy.

Environment

Configuration:
dryRun: 2
notesdestpath: c:\dev\notes
targetNotebook: PersonalNotebook
usedocx: 2
keepdocx: 2
docxNamingConvention: 1
prefixFolders: 1
mdFileNameAndFolderNameMaxLength: 64
medialocation: 1
conversion: markdown-simple_tables-multiline_tables-grid_tables+pipe_tables
headerTimestampEnabled: 1
keepspaces: 1
keepescape: 1
newlineCharacter: 1
exportPdf: 1

Output of $PSVersionTable

PS > $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.1.4
PSEdition                      Core
GitCommitId                    7.1.4
OS                             Microsoft Windows 10.0.19043
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

OneNote version info:
Microsoft® OneNote® for Microsoft 365 MSO (Version 2109 Build 16.0.14430.20224) 64-bit
Word:
Microsoft® Word for Microsoft 365 MSO (Version 2109 Build 16.0.14430.20224) 64-bit

I notice this comment in the code:

# Works between powershell 6.0 and 7.0, but not >= 7.1

Does that mean I need to downgrade power shell?

commented

@jazzay yes Powershell core 7.1 is not yet supported yet because it has issues with using GAC dependencies.

Could you run windows powershell (i.e. blue icon) instead of using powershell core (i.e. black icon)? Try pressing WIN + R and enter powershell.exe should get you Windows powershell. Windows Powershell version should be v5.1. and it should run fine.

commented

@jazzay did you manage to resolve this? if so i will close the issue.

commented

closing for inactivity.

For future readers, as of v2.17.1, powershell >= 7.1 somehow no longer loads GAC dependencies PowerShell/PowerShell#11860 (comment).

Please use powershell 5.1, or powershell core 6.0 up to 7.0.