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

not able export anything #102

Closed
indigofairyx opened this issue May 12, 2024 · 5 comments
Closed

not able export anything #102

indigofairyx opened this issue May 12, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@indigofairyx
Copy link

Describe the bug


hello! i was excited to find this tool, im new to learning .md and was looking forward to get my onenote lib freed from MS. alas...

I cannot get this to run from the exe. its crashing the CMD window without any warning or output.
after running this tool onenote wont function without rebooting my system.
ONENOTE_2024-05-12_05-26-11AM_488x144
ONENOTE_2024-05-12_06-05-26AM_502x110
ONENOTE_2024-05-12_06-05-44AM_999x144

To Reproduce
Steps to reproduce the behavior.
Ideally, export a basic OneNote notebook (.onepkg) that can be use to reproduce the issue. Tutorial to export .onepkg file is available here.


im not sure how to reproduce this error for anyone other than myself

Expected behavior
A clear and concise description of what you expected to happen.

Logs
Join the "logs.txt" log file located in the directory of the tool.
⚠️ Ensure that the log file do not contain any personal data ⚠️


the log file doesnt say much. the cmd window displays more much more info, breifly before it crashes. i had to run it twice more to quickly select all & copy, ill post that here.

-----------------------
- OneNote Md Exporter -
       v1.4.0.0
-----------------------

Before continue, please verify that :

* OneNote and Word of Office suite are correctly installed
* OneNote is running and the Notebooks to export are opened
This tool and OneNote are started with normal priviledges (NOT as an administrator)

Known limitations:
* The free application 'One Note For Windows' is not supported
* File attachments with certain extensions are not exported, including : wma, wmv, mpg, svg, mp3 (Issue #39)
* Password protected sections are not exported, except if they are unlocked before the export
* Hand-writting text is not exported

/!\ Allways keep a backup of your OneNote notebooks in case you discover later that some data is missing in the export /!\

Press [Enter] to continue...


***************************************
13 notebook(s) found(s).
***************************************

Please enter the notebook number to export, or a coma separated list of value (ex: "2,3,4") :
[0] Export all notebooks
[1] Computer Notes
[2] Software
[3] Hotkeys
[4] My Notebook
[5] Music
[6] FOOD
[7] Video Games
[8] DOWNLOADS
[9] Win7 - Computer Notes
[10] Web Articles
[11] YOGA & BODYWORK
[12] Cloud&Tree
[13] Linux
13

Please choose export format:
[1] Markdown
[2] Joplin Raw Folder
1

Open advance settings editor ?
[yes] or [Enter] to continue with current settings

Above is in the logs.txt.

below is was i was able to able to copy from the CMD window before it crashes.

Unhandled exception. System.IO.InvalidDataException: Failed to load configuration from file 'C:\Users\CLOUDEN\Downloads\OneNoteMdExporter.v1.4.0\appsettings.json'.
 ---> System.FormatException: Could not parse the JSON file.
 ---> System.Text.Json.JsonReaderException: 'ture,

  /* Name of the resource folder where attachemnts and image files are stored */
  "ResourceFolderName": "notes_media",

  /* Maximum number of characters of a page title. Among this limit, title is contracted. */
  "PageTitleMaxLength": 50,

  /****************************
    Markdown format general settings  :
  ****************************/

  /* Add at the begining of each page a YAML header that include Page metadata (cf https://assemble.io/docs/YAML-front-matter.html) */
  "AddFrontMatterHeader": true,

  /* Length limit of Section and page name used in file and folder name. Reduce this value to avoid error of max file system file path */
  "MdMaxFileLength": 69,

  /* How page hierarchies should be handled :
     - HiearchyAsFolderTree : as parent folders of the page. Ex: section/parentpage/childpage.md
     - HiearchyAsPageTitlePrefix : as page filename prefix. Ex: section/paarentpage_childpage.md
     - IgnoreHierarchy : ignore page hierarchy. Ex: section/childpage.md
  */
  "ProcessingOfPageHierarchy": "HiearchyAsFolderTree",

  /* For MdExport with ProcessingOfPageHierarchy=HiearchyAsPageTitlePrefix, the separator to use to prefix md page file name ; Ex: "_" value for "ParentPage_ChildPage.md" */
  "PageHierarchyFileNamePrefixSeparator": "_",

  /* Where file attachemnts and image files should me stored ?
     - RootFolder : in a single folder at the root of the export folder,
     - PageParentFolder : in folders next to the md file
  */
  "ResourceFolderLocation": "RootFolder",

  /****************************
    Markdown rendering settings
  ****************************/

  /* One of pandoc format https://pandoc.org/MANUAL.html#general-options ; Rq: For Joplin "gfm" is recommanded */
  "PanDocMarkdownFormat": "gfm",

  /* Convert HTML IMG tag generated by PanDoc into markdown references */
  "PostProcessingMdImgRef": true,

  /* Remove undesired quotation blocks sometimes generated by PanDoc */
  "PostProcessingRemoveQuotationBlocks": true,

  /* Remove OneNote header generated by OneNote Export APIs */
  "PostProcessingRemoveOneNoteHeader": true,

  /* Remove multiple consecutive linebreak generated by PanDoc */
  "DeduplicateLinebreaks": true,

  /* Prevent generation of more that 2 linebreaks in a row */
  "MaxTwoLineBreaksInARow": true
}' is an invalid JSON literal. Expected the literal 'true'. LineNumber: 6 | BytePositionInLine: 27.
   at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)
   at System.Text.Json.Utf8JsonReader.ThrowInvalidLiteral(ReadOnlySpan`1 span)
   at System.Text.Json.Utf8JsonReader.CheckLiteral(ReadOnlySpan`1 span, ReadOnlySpan`1 literal)
   at System.Text.Json.Utf8JsonReader.ConsumeLiteral(ReadOnlySpan`1 literal, JsonTokenType tokenType)
   at System.Text.Json.Utf8JsonReader.ConsumeValue(Byte marker)
   at System.Text.Json.Utf8JsonReader.ReadSingleSegment()
   at System.Text.Json.Utf8JsonReader.Read()
   at System.Text.Json.JsonDocument.Parse(ReadOnlySpan`1 utf8JsonSpan, JsonReaderOptions readerOptions, MetadataDb& database, StackRowStack& stack)
   at System.Text.Json.JsonDocument.Parse(ReadOnlyMemory`1 utf8Json, JsonReaderOptions readerOptions, Byte[] extraRentedArrayPoolBytes, PooledByteBufferWriter extraPooledByteBufferWriter)
   at System.Text.Json.JsonDocument.Parse(ReadOnlyMemory`1 json, JsonDocumentOptions options)
   at System.Text.Json.JsonDocument.Parse(String json, JsonDocumentOptions options)
   at Microsoft.Extensions.Configuration.Json.JsonConfigurationFileParser.ParseStream(Stream input)
   at Microsoft.Extensions.Configuration.Json.JsonConfigurationProvider.Load(Stream stream)
   --- End of inner exception stack trace ---
   at Microsoft.Extensions.Configuration.Json.JsonConfigurationProvider.Load(Stream stream)
   at Microsoft.Extensions.Configuration.FileConfigurationProvider.Load(Boolean reload)
   --- End of inner exception stack trace ---
   at Microsoft.Extensions.Configuration.FileConfigurationProvider.HandleException(ExceptionDispatchInfo info)
   at Microsoft.Extensions.Configuration.FileConfigurationProvider.Load(Boolean reload)
   at Microsoft.Extensions.Configuration.ConfigurationRoot..ctor(IList`1 providers)
   at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build()
   at alxnbl.OneNoteMdExporter.Infrastructure.AppSettings.LoadAppSettings()
   at alxnbl.OneNoteMdExporter.Program.RunOptions(Options opts)
   at CommandLine.ParserResultExtensions.WithParsed[T](ParserResult`1 result, Action`1 action)
   at alxnbl.OneNoteMdExporter.Program.Main(String[] args)

Desktop (please complete the following information):


  • OneNodeMdExporter version : 1.4.0
  • Windows version : 10 v 22h2 build 19045.4291 64 bits
  • Office Version : 16.0.17231.20194 32 bits -from apps & features list, the click-to-run version
  • onenote Version: 2016 MSO Version 2401 (Build 17231.20194 Click-to-Run) -from about onenote
    ApplicationFrameHost_2024-05-12_06-35-50AM_582x178

Additional context
Add any other context about the problem here.


a few considerations that might be getting in my own way.

  • these notebooks are all local, i never have signed in with a microsoft account
  • i use 3 other software's such as O&O Shut Up, Winaero Tweaker, and WinUtil to turn off microsofts Telemetry, Updates and 60 pieces of spyware, excuse me, "Services" running in the background. could these interfering?

addtionally, for sh*tz & giggles, i also tried running this on my windows 7 install with the same crash. on my old win7 install i dont have much blocked because i do not use it on the internet anymore, in llloonnggg time.

OO_Shut_Up_10_v1 9 1436_2024-05-12_09-45-14AM_917x929

ONENOTE_2024-05-12_06-59-29AM_978x786

@indigofairyx indigofairyx added the bug Something isn't working label May 12, 2024
@alxnbl
Copy link
Owner

alxnbl commented May 12, 2024

Hey @indigofairyx ,

This error is due a bad syntax of settings file :

Unhandled exception. System.IO.InvalidDataException: Failed to load configuration from file 'C:\Users\CLOUDEN\Downloads\OneNoteMdExporter.v1.4.0\appsettings.json'.
---> System.FormatException: Could not parse the JSON file.
---> System.Text.Json.JsonReaderException: 'ture,

("Ture" instead of "true").

Other errors seems to come from your onenote installation. Try yo repair it or if you can run the tool on an other computer.

@indigofairyx
Copy link
Author

indigofairyx commented May 12, 2024

hahaha. oop. oh my proof read!

maybe we should delete this embarrassing post. LOL 🤣🤣🤣🤣

@indigofairyx
Copy link
Author

Thank You!

@indigofairyx
Copy link
Author

Also the settings file is case sensitive, even if spelled correctly, 'True' {incorrect. Caused the same error} and 'true' {correct} are different.

It's working great now!!!

Furthermore, THANK YOU, THANK YOU THANK YOU this tool is more than amazing. Better than imagined, markdown is awesome. Ive been trying to get myself outta MS sinking ship for a couple years and markdown is the amazing winning ticket! :-)

@alxnbl
Copy link
Owner

alxnbl commented May 14, 2024

Thanks!

@alxnbl alxnbl closed this as completed May 14, 2024
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

No branches or pull requests

2 participants