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

ErrorPreventToCommunicateWithOneNote #86

Closed
jimbobshazham opened this issue Jun 1, 2023 · 9 comments · Fixed by #97
Closed

ErrorPreventToCommunicateWithOneNote #86

jimbobshazham opened this issue Jun 1, 2023 · 9 comments · Fixed by #97
Labels
bug Something isn't working

Comments

@jimbobshazham
Copy link

Describe the bug
A clear and concise description of what the bug is.
The program exits with the following

ErrorPreventToCommunicateWithOneNote
Press [Enter] to continue...

The program then spits the following out:

Unhandled exception. System.Runtime.InteropServices.COMException (0x80040154): Class not registered (0x80040154 (REGDB_E_CLASSNOTREG))
at System.RuntimeTypeHandle.AllocateComObject(Void* pClassFactory)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
at System.Activator.CreateInstance(Type type, Boolean nonPublic, Boolean wrapExceptions)
at System.Activator.CreateInstance(Type type)
at alxnbl.OneNoteMdExporter.Program.RunOptions(Options opts) in D:\Alex\Code\onenote-md-exporter\src\OneNoteMdExporter\Program.cs:line 66
at alxnbl.OneNoteMdExporter.Program.<>c.

b__2_0(Options options) in D:\Alex\Code\onenote-md-exporter\src\OneNoteMdExporter\Program.cs:line 54
at CommandLine.ParserResultExtensions.WithParsed[T](ParserResult1 result, Action1 action)
at alxnbl.OneNoteMdExporter.Program.Main(String[] args) in D:\Alex\Code\onenote-md-exporter\src\OneNoteMdExporter\Program.cs:line 47

I suspect something has gone wrong when building the latest release as I don't reckonise the path mentioned in that blurb

@jimbobshazham jimbobshazham added the bug Something isn't working label Jun 1, 2023
@alxnbl
Copy link
Owner

alxnbl commented Jun 2, 2023

Hey @jimbobshazham , this error seams to be raised on computers with a broken office installation. Can you try to launch the office repair tool, or uninstall and reinstall office. Alternatively, you can transfer your notebooks (export/import) on an other computer and run the OneNodeMdExporter on it. Hope it will help.

@jimbobshazham
Copy link
Author

jimbobshazham commented Jun 2, 2023 via email

@alxnbl
Copy link
Owner

alxnbl commented Jun 3, 2023

An office installation is mandatory to run the tool.

@jimbobshazham
Copy link
Author

jimbobshazham commented Jun 3, 2023 via email

@alxnbl
Copy link
Owner

alxnbl commented Jun 3, 2023

During startup, the tool display the requirement and specifically the office requirement. So it expects people has read it and do not run the export without Office. But I agree with you that I could update the error message in a future version.

@jimbobshazham
Copy link
Author

jimbobshazham commented Jun 3, 2023 via email

@alxnbl
Copy link
Owner

alxnbl commented Jun 3, 2023

Hmm understood !
I was not expecting your error to occur before the display of the welcome message. About the fle path displayed, it is the path of my build folder. Should have been masked during build process.

alxnbl pushed a commit that referenced this issue Sep 22, 2023
@undisker
Copy link

undisker commented Sep 25, 2023

This may help - you need to run both tool console and OneNote as Administrator - this helped to me.

To the author - elevated mode for the OneNoteExplorer only doesn't help, so it make sense to handle the error code "cannot run" and suggest to "Run OneNote as Administrator and press ENTER"

@alxnbl
Copy link
Owner

alxnbl commented Sep 25, 2023

Actually, the recommandation is to run both the tool and OneNote without admin privilege.

@alxnbl alxnbl mentioned this issue Dec 9, 2023
@alxnbl alxnbl closed this as completed in #97 Dec 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants