alxnbl / onenote-md-exporter

ConsoleApp to export OneNote notebooks to Markdown formats
GNU General Public License v3.0
925 stars 75 forks source link

Every page is being ignored with the error code 0x80042006 #9

Closed climabhi closed 3 years ago

climabhi commented 3 years ago

When this app works, it will be a lifesaver. It doesn't for me right now I have pandoc and .net 5 installed, but every page is being ignored with error message System.Runtime.InteropServices.COMException (0x80042006): 0x80042006.

alxnbl commented 3 years ago

Hey @abhidwiv ,

Could you :

If even with a dummy notebook the problem occurs, you can try to fully uninstall and reinstall Office and try again.

I hope we will find the origin of this issue.

neverthejetsetter commented 3 years ago

Hello, I am receiving a similar error. I'm running Windows 10, OneNote 2016 (Stand Alone) 64 bit. I have plenty of free memory.

I'm also receiving the following error when attempting the "dotnet build" and "dotnet run":

Joplin\onenote-md-exporter\src\alxnbl.OneNoteMdExporter.csproj : warning NU1701: Package 'Interop.Microsoft.Office.Interop.OneNote 1.1.0' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework 'net5.0'. This package may not be fully compatible with your project.

der-heinz commented 3 years ago

Hello, I am receiving a similar error too. I'm running Windows 10 (virtualized via VMWareFusion on my Mac), OneNote 2016 (Stand Alone) 64 bit. I also have plenty of free memory. dotnet output: C:\Users\sahe>dotnet

Usage: dotnet [options] Usage: dotnet [path-to-application]

Options: -h|--help Display help. --info Display .NET information. --list-sdks Display the installed SDKs. --list-runtimes Display the installed runtimes.

path-to-application: The path to an application .dll file to execute. I also tried with Windows7 (x64), OneNote 2016 and receive a different Error there: Extract from LOG: 2021-03-02 17:37:14.027 +01:00 [INF] ----------------------- 2021-03-02 17:37:14.042 +01:00 [INF] - OneNote Md Exporter - 2021-03-02 17:37:14.042 +01:00 [INF] v0.3.1.0 2021-03-02 17:37:14.042 +01:00 [INF] -----------------------

2021-03-02 17:37:14.105 +01:00 [INF] 5 notebook(s) found(s). Please enter the notebooks number to export : 2021-03-02 17:37:14.105 +01:00 [INF] [0] Export all notebooks 2021-03-02 17:37:14.105 +01:00 [INF] [1] Mein Notizbuch 2021-03-02 17:37:14.105 +01:00 [INF] [2] FreieEnergie 2021-03-02 17:37:14.120 +01:00 [INF] [3] Nummerologie 2021-03-02 17:37:14.120 +01:00 [INF] [4] my-private-notebook 2021-03-02 17:37:14.120 +01:00 [INF] [5] Haus 2021-03-02 17:37:17.303 +01:00 [INF] Please choose export format: 2021-03-02 17:37:17.303 +01:00 [INF] [1] Markdown folder tree 2021-03-02 17:37:17.303 +01:00 [INF] [2] Joplin folder 2021-03-02 17:37:19.643 +01:00 [INF] 2021-03-02 17:37:19.643 +01:00 [INF]


2021-03-02 17:37:19.659 +01:00 [INF] Start exporting notebook: Haus 2021-03-02 17:37:19.659 +01:00 [INF] *** 2021-03-02 17:37:19.737 +01:00 [INF] --> Found 10 sections and sections groups

2021-03-02 17:37:19.737 +01:00 [INF] Start processing section (1/10) : Haus\Garten\Garten 2021-03-02 17:37:19.815 +01:00 [INF] Page 1/1 : WK-Paletten 2021-03-02 17:37:21.843 +01:00 [ERR] Error during processing of page WK-Paletten [452beee38562416c954b78054bd92053]. Page ignored. Error message : Das System kann die angegebene Datei nicht finden. System.ComponentModel.Win32Exception (2): Das System kann die angegebene Datei nicht finden. at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at System.Diagnostics.Process.Start(ProcessStartInfo startInfo) at alxnbl.OneNoteMdExporter.Services.ConverterService.ConvertDocxToMd(Page page, String inputFilePath, String resourceFolderPath, Int32 sectionTreeLevel) in C:\Src\GitH\onenote-md-exporter\src\Services\ConverterService.cs:line 52 at alxnbl.OneNoteMdExporter.Services.Export.JoplinExportService.ExportSection(Node section) in C:\Src\GitH\onenote-md-exporter\src\Services\Export\JoplinExportService.cs:line 114 2021-03-02 17:37:21.921 +01:00 [INF] Start processing section (2/10) : Haus\Klimaanlage\Klimaanlage 2021-03-02 17:37:22.467 +01:00 [INF] Page 1/4 : Klima-Anlage OG 2021-03-02 17:37:23.840 +01:00 [ERR] Error during processing of page Klima-Anlage OG [fa33debb0b224adb97aa5bc4ba5c30b9]. Page ignored. Error message : Das System kann die angegebene Datei nicht finden. System.ComponentModel.Win32Exception (2): Das System kann die angegebene Datei nicht finden. at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at System.Diagnostics.Process.Start(ProcessStartInfo startInfo) at alxnbl.OneNoteMdExporter.Services.ConverterService.ConvertDocxToMd(Page page, String inputFilePath, String resourceFolderPath, Int32 sectionTreeLevel) in C:\Src\GitH\onenote-md-exporter\src\Services\ConverterService.cs:line 52 at alxnbl.OneNoteMdExporter.Services.Export.JoplinExportService.ExportSection(Node section) in C:\Src\GitH\onenote-md-exporter\src\Services\Export\JoplinExportService.cs:line 114 2021-03-02 17:37:23.840 +01:00 [INF] Page 2/4 : Klimaanlage Evaluation 2021-03-02 17:37:25.322 +01:00 [ERR] Error during processing of page Klimaanlage Evaluation [8a5c26ea4e3f45ce8e759b8982e4fbc8]. Page ignored. Error message : Das System kann die angegebene Datei nicht finden. System.ComponentModel.Win32Exception (2): Das System kann die angegebene Datei nicht finden. at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at System.Diagnostics.Process.Start(ProcessStartInfo startInfo) at alxnbl.OneNoteMdExporter.Services.ConverterService.ConvertDocxToMd(Page page, String inputFilePath, String resourceFolderPath, Int32 sectionTreeLevel) in C:\Src\GitH\onenote-md-exporter\src\Services\ConverterService.cs:line 52 at alxnbl.OneNoteMdExporter.Services.Export.JoplinExportService.ExportSection(Node section) in C:\Src\GitH\onenote-md-exporter\src\Services\Export\JoplinExportService.cs:line 114 2021-03-02 17:37:25.322 +01:00 [INF] Page 3/4 : BTU Recommendations Based on Square Footage 2021-03-02 17:37:26.898 +01:00 [ERR] Error during processing of page BTU Recommendations Based on Square Footage [d11ca30ef7774e6283a81ae5ccbdd93d]. Page ignored. Error message : Das System kann die angegebene Datei nicht finden. THX for you help Would be awesome, if the app would run as expected kind regards Heinz

alxnbl commented 3 years ago

Hey all, I tried to fix the OneNote error issue in a Beta release available here : https://github.com/alxnbl/onenote-md-exporter/releases/tag/v0.4.0-Beta1

Could you please give it a try ? Thanks

@der-heinz , I your first log output, I see only the result of "dotnet" command, not OneNoteMdExport exe. And in the 2nd log output I suspect that PanDoc is not correctly installed.

neverthejetsetter commented 3 years ago

Hello, I gave it a try, but it's not exporting usable files and this is what is displayed in the terminal:


Start exporting notebook: Dummy Notebook


--> Found 2 sections and sections groups

Start processing section (1/2) : Dummy Notebook\New Section 1\New Section 1 Page 1/1 : Dummy Note Error during processing of page Dummy Note [fbfea661e8c242209c820d478da17ac3]. Page ignored. Error message : 0x80042006 Start processing section (2/2) : Dummy Notebook\New Section 2\New Section 2 Page 1/1 : This is a New Page Error during processing of page This is a New Page [b3f0fca97d1348e2af60d5095d9acdcc]. Page ignored. Error message : 0x80042006

--> Notebook export successful Export folder : 'D:\Workfiles\Export Folder\OneNote\Dummy Notebook'

This is what gets exported to the 'Dummy Notebook':

image

And here is an example of one of the files:

image

The resource folder is empty. And just to re-confirm, I'm running Windows 10, OneNote 2016 (Stand Alone) 64 bit. And I have plenty of free memory.

der-heinz commented 3 years ago

Hey all, I tried to fix the OneNote error issue in a Beta release available here : https://github.com/alxnbl/onenote-md-exporter/releases/tag/v0.4.0-Beta1

Could you please give it a try ? Thanks

@der-heinz , I your first log output, I see only the result of "dotnet" command, not OneNoteMdExport exe. And in the 2nd log output I suspect that PanDoc is not correctly installed.

Hello Reinstalling dotnet helped, now it works just perfect with the version OneNoteMdExporter.v0.3.1-x64 on my Windows 7 and OneNote 2016! Awesome it imports just as expected the Structure, Images and Tables as well. As this saves a lot of time, I'd like to donate something. could you please provide and method to donate (paypal,TWINT,etc). Thanks again! kind regards Heinz

alxnbl commented 3 years ago

Hello Reinstalling dotnet helped, now it works just perfect with the version OneNoteMdExporter.v0.3.1-x64 on my Windows 7 and OneNote 2016! Awesome it imports just as expected the Structure, Images and Tables as well. As this saves a lot of time, I'd like to donate something. could you please provide and method to donate (paypal,TWINT,etc). Thanks again! kind regards Heinz

Thanks a lot, very glad it finally works for you . I really appreciate your proposition of donation. If you are also a Joplin user I suggest you to give a donation to Laurent, the main developer, who is working hard and definitively needs support : https://joplinapp.org/donate/ . I personally support him on Patreon, hoping it can helps him making Joplin as good as OneNote, or even better ! :)

By the way, I released yesterday a new version 0.4.0 Beta2 of the tool, do you mind to give it a try and confirm me that this version is also working on your configuration. I am struggling with OneNote errors (Interop Integration) and try to get some user feedbacks.

Thanks

der-heinz commented 3 years ago

Hello Reinstalling dotnet helped, now it works just perfect with the version OneNoteMdExporter.v0.3.1-x64 on my Windows 7 and OneNote 2016! Awesome it imports just as expected the Structure, Images and Tables as well. As this saves a lot of time, I'd like to donate something. could you please provide and method to donate (paypal,TWINT,etc). Thanks again! kind regards Heinz

Thanks a lot, very glad it finally works for you . I really appreciate your proposition of donation. If you are also a Joplin user I suggest you to give a donation to Laurent, the main developer, who is working hard and definitively needs support : https://joplinapp.org/donate/ . I personally support him on Patreon, hoping it can helps him making Joplin as good as OneNote, or even better ! :)

By the way, I released yesterday a new version 0.4.0 Beta2 of the tool, do you mind to give it a try and confirm me that this version is also working on your configuration. I am struggling with OneNote errors (Interop Integration) and try to get some user feedbacks.

Thanks

The version 0.4.0 Beta2 works the same way as the former version on my Windows 7 and OneNote 2016 (same result). Question, why are attachements not exported, just like files? Interestlingly Images get well exported, but .pdf, .msg or other mime types are just ignored. Surpricingly PDF Documents, which have been attached in onenote as chapters (each pdf page results in one onenotepage) agetting exported well. Properly as images...

alxnbl commented 3 years ago

Thank you for the test. Attachements are supposed to be exported correctly. I tested only with pdf and zip files. If you want, you can create a new issue with a dummy notebook to help me to reproduce the issue.