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

Images not being exported for Notebook with apostrophe #90

Closed
J-SHarper opened this issue Aug 24, 2023 · 8 comments
Closed

Images not being exported for Notebook with apostrophe #90

J-SHarper opened this issue Aug 24, 2023 · 8 comments
Labels
bug Something isn't working question Further information is requested

Comments

@J-SHarper
Copy link

Describe the bug
Images are not being exported for some reason.
To Reproduce

Steps to reproduce the behavior.
Attempt to export any of my notebooks.
All of the images fail with the below error. No other errors are logged.

Expected behavior
I hoped images would be exported.

Logs
Here is the error: [15:49:21 WRN] Page 'Joshua's Notebook\Quick Notes\Photo IMG_8689': Error while extracting images of the page. Nothing else seems out of the ordinary. Happy to private message the logs file to anyone who can help.

Desktop (please complete the following information):

  • OneNodeMdExporter version : 1.3.0
  • Windows version : 11 Pro 64 bits
  • Office Version : 2307 64 bits

Additional context
Failed across all of my notebooks.

@J-SHarper J-SHarper added the bug Something isn't working label Aug 24, 2023
@alxnbl alxnbl added the help wanted Extra attention is needed label Sep 1, 2023
@alxnbl
Copy link
Owner

alxnbl commented Sep 1, 2023

Thank for your report. Sorry but I will be very busy the next few months and will not be able to have a look to the issue. Hopefully, a kind contributor will take a look at your problem.

@mgelmantech
Copy link

I found that removing the apostrophe (i.e. "Michaels's Notebook" -> "Michaels Notebook") fixed this issue for me. I suspect there's something going on with the character conversion in the path somewhere but I was unable to track it down in the short period of time I had to look at it.

@alxnbl
Copy link
Owner

alxnbl commented Sep 10, 2023

Thanks a lot a for the feedback. I will try to solve the issue in the next version of the tool*.

@alxnbl alxnbl changed the title Images not being exported Images not being exported for Notebook with apostrophe Sep 10, 2023
@alxnbl
Copy link
Owner

alxnbl commented Sep 10, 2023

Related to #80

@alxnbl
Copy link
Owner

alxnbl commented Sep 22, 2023

I did not managed to reproduce the bug. Do you mind to send me a sample Onenote notebook that cause the crash to append ?
Thanks

@alxnbl alxnbl added question Further information is requested and removed help wanted Extra attention is needed labels Sep 22, 2023
@armstrong-pv
Copy link

armstrong-pv commented Dec 6, 2023

Hi, I created a PR fix for this, as it happened with my notebook, titled: Paul's Notebook. I think any 'special' HTML character would cause the issue, as attachment paths were being translated like this:
C:\\Users\\Paul\\AppData\\Local\\Temp\\Paul's Notebook\\pandoc\\media\\image1.png
PR fix: #96
The export would fail on every page that had image attachments, but now they all export successfully. Error report from the app:

Page 'Paul's Notebook\Linux\Useful Linux Commands': Error while extracting images of the page.
Page 'Paul's Notebook\Linux\Useful Linux Commands': Error during processing of page Useful Linux Commands [0ce9933751154deebed4b53d4965adcb]. Page ignored. Error message : Could not find file 'C:\Users\Paul\Downloads\OneNoteMdExporter.v1.3.0\Exports\joplin-raw-dir\Paul's Notebook-20231206 12-47\Paul's Notebook\resources\4bc83c35935f4425a7a68b3ae88d951b.png'

And great tool by the way! Not sure what I would have done without it 🙏
Now I have to reimport the folder into Joplin. Since my first import excluded pages with images, I'm hoping I can just reimport and the new content will magically turn up and not screw existing content / create duplicates. Gulp...

@alxnbl
Copy link
Owner

alxnbl commented Dec 9, 2023

Thanls a lot for the PR, I will review it as soon as possible.

alxnbl added a commit that referenced this issue Dec 9, 2023
…oding

HTML decode attachment paths
Fix #80 and #90
@alxnbl alxnbl mentioned this issue Dec 9, 2023
@alxnbl alxnbl closed this as completed Dec 10, 2023
@alxnbl
Copy link
Owner

alxnbl commented Dec 10, 2023

Thanks again to reproduce and fix the bug @armstrong-pv ! The fix is embedded in version 1.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants