Comments (7)
Got it. Need to install Word as well.
from convertonenote2markdown.
Yes, see these other Issues - #3 and #4 - "Class Not Registered" error will happen if you don't have MS Word installed. Also, you have to run both OneNote and PowerShell as Administrator or you will get errors
from convertonenote2markdown.
BTW, great initiative. I really need this to move away from OneNote.
from convertonenote2markdown.
“~/export” Is not a valid path... please type a full and existing absolute path as target
from convertonenote2markdown.
When using c:\export i get the same:
PS C:\Users\Toontje\ConvertOneNote2MarkDown> .\ConvertOneNote2MarkDown.ps1
Enter the (preferably empty!) folder path (without trailing backslash!) that will contain your resulting Notes structure. ex. 'c:\temp\notes': ~/export
Ton @ Sites - Company Inc
Directory: C:\Users\Toontje\export
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 7/7/2020 5:09 PM Ton_@_Sites_-_Company_Inc
==============
## Customers
## Tech
--------------
### Quick Notes
Directory: C:\Users\Toontje\export\Ton_@_Sites_-_Company_Inc
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 7/7/2020 5:09 PM Quick_Notes
#### Lab
Error while publishing file 'Lab' to docx: Exception calling "Publish" with "4" argument(s): "Exception from HRESULT: 0x80042006"
pandoc.exe: ~/export\Ton_@_Sites_-_Company_Inc\Quick_Notes\Lab.docx: openBinaryFile: does not exist (No such file or directory)
Get-Content : Cannot find path 'C:\Users\Toontje\export\Ton_@_Sites_-_Company_Inc\Quick_Notes\Lab.md' because it
does not exist.
At C:\Users\Toontje\ConvertOneNote2MarkDown\ConvertOneNote2MarkDown.ps1:192 char:19
+ ... ((Get-Content -path "$($fullexportpathwithoutextension).md" ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\Users\Ton Ma...ck_Notes\Lab.md:String) [Get-Content], ItemNotFoundEx
ception
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand
Error while renaming image file path references for file 'Lab': You cannot call a method on a null-valued expression.
#### Company Wifi
Error while publishing file 'Company Wifi' to docx: Exception calling "Publish" with "4" argument(s): "Exception from HRESULT: 0x80042006"
pandoc.exe: ~/export\Ton_@_Sites_-_Company_Inc\Quick_Notes\Company_Wifi.docx: openBinaryFile: does not exist (No such file or directory)
Get-Content : Cannot find path 'C:\Users\Toontje\export\Ton_@_Sites_-_Company_Inc\Quick_Notes\Company_Wifi.md'
because it does not exist.
At C:\Users\Toontje\ConvertOneNote2MarkDown\ConvertOneNote2MarkDown.ps1:192 char:19
+ ... ((Get-Content -path "$($fullexportpathwithoutextension).md" ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\Users\Ton Ma...\Company_Wifi.md:String) [Get-Content], ItemNotFoundEx
ception
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand
Can it be the @ sign that is causing the problem?
I also have a bunch of these errors:
Error while renaming image file path references for file 'Vanalles': You cannot call a method on a null-valued expression.
0
Error while publishing file 'Lab' to docx: Exception calling "Publish" with "4" argument(s): "Class not registered
Class not registered
"
Error while renaming image file path references for file 'Lab': You cannot call a method on a null-valued expression.
Error while publishing file 'Company Wifi' to docx: Exception calling "Publish" with "4" argument(s): "Class not registered
Class not registered
"
Error while renaming image file path references for file 'Company Wifi': You cannot call a method on a null-valued expression.
Error while publishing file 'JOIN WEBEX MEETING' to docx: Exception calling "Publish" with "4" argument(s): "Class not registered
Class not registered
"
Error while renaming image file path references for file 'JOIN WEBEX MEETING': You cannot call a method on a null-valued expression.
Error while publishing file 'Home network' to docx: Exception calling "Publish" with "4" argument(s): "Class not registered
Class not registered
"
Error while renaming image file path references for file 'Home network': You cannot call a method on a null-valued expression.
Error while publishing file 'Bettercap2' to docx: Exception calling "Publish" with "4" argument(s): "Class not registered
Any ideas? I really want to get this to work.
from convertonenote2markdown.
Hi @Toontje I still see the path '~/export' being used as your input parameter in your log, this will not work. use 'c:\export' and make sure the folder exists.
Could you please read the documentation again and make use of the other issues present in this repository. BTW all issues have been solved some way or another. The script in itself just works but maybe your system has security restrictions or compatibility issues preventing Windows10, Powershell, Pandoc, Word and OneNote form working together correctly. I do hope you figure it out.
from convertonenote2markdown.
Yes, see these other Issues - #3 and #4 - "Class Not Registered" error will happen if you don't have MS Word installed. Also, you have to run both OneNote and PowerShell as Administrator or you will get errors
@SjoerdV Please add to the REAMDE, that _ both need to run as Administrator_.
it works now, when BOTH run as admin. Thanks for a nice script :D
from convertonenote2markdown.
Related Issues (20)
- I modified the code to allow for section groups HOT 3
- Error: Server execution failed HOT 1
- Test Issue
- Looking for hints on how to fix errors HOT 2
- [minor bug] duplicate names HOT 2
- Error while converting
- [WARNING] Deprecated: --atx-headers. Use --markdown-headings=atx instead HOT 1
- Error while publishing file 'xxx' to docx: Exception calling "Publish" with "4" argument(s): "Exception from HRESULT: 0x8004201A" HOT 1
- Exception calling "GetHierarchy" with "3" argument(s) HOT 5
- More conversion errors HOT 2
- subpages with identical names but in different parents overwrite each other HOT 2
- Error when running the script HOT 1
- `ConvertOneNote2MarkDown.ps1` exits after taking path, doesn't convert anything HOT 1
- Script at present seems to need powershell 6 or below. HOT 3
- Error when title is longer than 183 characters HOT 3
- Section Groups HOT 2
- Instructions for Installing from Chocolatey HOT 2
- Converter is adding ">" before all bullets, as well as extra lines HOT 10
- Subfolders rather than appending a prefix for subpages? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from convertonenote2markdown.