Giter VIP home page Giter VIP logo

Comments (7)

aisbergde avatar aisbergde commented on September 2, 2024

I repaired office, and now it is running, but I get a lot of errors. I will wait it to finish and then I will see. What I see is, something is generated in the target folder.

from convertonenote2markdown.

aisbergde avatar aisbergde commented on September 2, 2024

folders are created, but they are empty. And these are the errors:

#### Urlaubsplus | Suche
Error while publishing file 'Urlaubsplus | Suche' to docx: Ausnahme beim Aufrufen von "Publish" mit 4 Argument(en):  "Der RPC-Server ist nicht verfügbar. (Ausnahme von HRESULT: 0x800706BA)"
pandoc.exe: d:\onenote_2_markdown\Urlaub\Urlaub_2020_Winter_Malta\Urlaubsplus___Suche.docx: openBinaryFile: does not exist (No such file or directory)
Ausnahme beim Aufrufen von "GetPageContent" mit 3 Argument(en):  "Der RPC-Server ist nicht verfügbar. (Ausnahme von
HRESULT: 0x800706BA)"
In D:\Repos\GitHub\ConvertOneNote2MarkDown\ConvertOneNote2MarkDown.ps1:141 Zeichen:15
+               $OneNote.GetPageContent($pageid, [ref]$pagexml, 7)
+               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : COMException

Get-Content : Der Pfad "D:\onenote_2_markdown\Urlaub\Urlaub_2020_Winter_Malta\Urlaubsplus___Suche.md" kann nicht
gefunden werden, da er nicht vorhanden ist.
In D:\Repos\GitHub\ConvertOneNote2MarkDown\ConvertOneNote2MarkDown.ps1:192 Zeichen:19
+ ...           ((Get-Content -path "$($fullexportpathwithoutextension).md" ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (D:\onenote_2_ma...plus___Suche.md:String) [Get-Content], ItemNotFoundEx
   ception
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand

Error while renaming image file path references for file 'Urlaubsplus | Suche': Es ist nicht möglich, eine Methode für einen Ausdruck aufzurufen, der den NULL hat.

from convertonenote2markdown.

aisbergde avatar aisbergde commented on September 2, 2024

I restarted Windows, restarted OneNote several times and now ti works. it looks like a communication error between powershell and OneNote

from convertonenote2markdown.

SjoerdV avatar SjoerdV commented on September 2, 2024

Great to see you figured it out! Hope it helps you.

from convertonenote2markdown.

dirkagterhuis avatar dirkagterhuis commented on September 2, 2024

Hi @SjoerdV, first of all: wonderful work on creating this, it will definitely release me from my onenote lock-in into the world of markdown notes!

I think I'm running into the same issue as @aisbergde. I'm using Office 365 & Windows 10. When I run the Powershell command, I get the following (I copied the example error log of 1 test notebook page called 'Test', which is output in the terminal):

#### Test
Error while publishing file 'Test' to docx: Exception calling "Publish" with "4" argument(s): "Exception from HRESULT: 0x80042006"
pandoc.exe: ..\poging2\Persoonlijk_(web)\Quick_Notes\Test.docx: openBinaryFile: does not exist (No such file or directory)
Get-Content : Cannot find path 'D:\Onenote Migratie\poging2\Persoonlijk_(web)\Quick_Notes\Test.md' because it does not exist.
At D:\Onenote Migratie\ConvertOneNote2MarkDown\ConvertOneNote2MarkDown.ps1:192 char:19
+ ...           ((Get-Content -path "$($fullexportpathwithoutextension).md" ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (D:\Onenote Migr...k_Notes\Test.md:String) [Get-Content], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand
 
Error while renaming image file path references for file 'Test': You cannot call a method on a null-valued expression.

I think it's to do with the Onenote version. It seems to go wrong in the part where the .docx is created. I believe the error code 0x80042006 belongs to onenote, stating that something can't be found. When I opened onenote, I also didn't see the export option to a .doxc format.

After reinstalling office, I noticed now that the option to export a Onenote page to a .docx file was available, so my hopes were high, but I still got the same error.

Do you have any suggestions?

from convertonenote2markdown.

dirkagterhuis avatar dirkagterhuis commented on September 2, 2024

ah, the thing that made a difference: I used "../targetdirectory" when I was asked to provide the target directory, but when I used the full path, it worked. Anyhow, thanks for making this!

from convertonenote2markdown.

SjoerdV avatar SjoerdV commented on September 2, 2024

Great to hear you got it working and found it a useful script @dirkagterhuis, cheers!

from convertonenote2markdown.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.