Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Com error E_FAIL during call to Get-OneNoteHierarchy #110

Closed
jazzay opened this issue Oct 11, 2021 · 5 comments
Closed

Com error E_FAIL during call to Get-OneNoteHierarchy #110

jazzay opened this issue Oct 11, 2021 · 5 comments
Assignees
Labels
wontfix This will not be worked on
Milestone

Comments

@jazzay
Copy link

jazzay commented Oct 11, 2021

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
@jazzay jazzay added the bug Something isn't working label Oct 11, 2021
@jazzay
Copy link
Author

jazzay commented Oct 11, 2021

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

@jazzay
Copy link
Author

jazzay commented Oct 11, 2021

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?

@leojonathanoh
Copy link
Member

@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.

@leojonathanoh leojonathanoh self-assigned this Oct 11, 2021
@leojonathanoh leojonathanoh added wontfix This will not be worked on and removed bug Something isn't working labels Oct 11, 2021
@leojonathanoh leojonathanoh added this to the v2.17.1 milestone Oct 11, 2021
@leojonathanoh
Copy link
Member

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

@leojonathanoh
Copy link
Member

leojonathanoh commented Oct 19, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants