question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Relative images not found

See original GitHub issue

Thanks for writing this script. I can successfully import text Markdown files with it. However, in testing this it’s failing to locate relative images.

I have a directory structure on Mac ~/Desktop/test/ where the contents of test are a file Favorite tweet – PizzoniGiada – June 17, 2020 at 0901AM.md and a folder Favorite tweet – PizzoniGiada – June 17, 2020 at 0901AM which contains a single image image_1.jpeg.

Running using Python 3.8.3 and the latest version of md2notion installed via pip3 install md2notion, I am getting the following:

ELSLABM-155961:Desktop stratfordm$ python3 -m md2notion {token_2} https://www.notion.so/Test-0192acd694d443ec924a2a5de270c90d /Users/stratfordm/Desktop/test/Favorite\ tweet\ – PizzoniGiada\ –\ June\ 17\,\ 2020\ at\ 0901AM.md 
Initializing Notion.so client...
Getting target PageBlock...
Uploading /Users/stratfordm/Desktop/test/Favorite tweet – PizzoniGiada – June 17, 2020 at 0901AM.md to Notion.so at page Favorite tweet – PizzoniGiada – June 17, 2020 at 0901AM.md...
Uploading ImageBlock, 4/7 (57.1%)ERROR: Local image '/Users/stratfordm/Desktop/test/Favorite%20tweet%20%E2%80%93%C2%A0PizzoniGiada%20%E2%80%93%20June%2017,%202020%20at%200901AM/image_1.jpeg' not found to upload. Skipping...
Uploading TextBlock, 7/7 (100.0%)EL

The end result is a note created but without the image attachment.

Hope this helps.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Cobertoscommented, Aug 26, 2020

Alright, this should now work for you in v2.1.1. We can reopen if it doesn’t

0reactions
mattstratfordcommented, Aug 26, 2020

Thanks! I’ll take a look presently…

Read more comments on GitHub >

github_iconTop Results From Across the Web

html - Image not found altough right relative path is specified
1 Answer 1 · Place your image in public/_images instead of application/_images (normally, all the files that can be sent without passing by...
Read more >
Relative Path Images Not Displaying · Issue #2 - GitHub
I noticed that when I include an image with a full path the image displays fine. As in this example:
Read more >
HTML File Paths - W3Schools
A relative file path points to a file relative to the current page. In the following example, the file path points to a...
Read more >
Externally referenced files (Xrefs) set to Relative path are ...
Issue: Externally referenced files (Xrefs), such as PDF files, raster images, or drawings, that are set to use a Relative path are missing...
Read more >
How to fix image not showing in an HTML page
One reason for images not showing up on a website is because the browser or the server cache still serving the old HTML...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found