Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 08-07-2017, 11:43 PM   #1
dbird
Junior Member
dbird began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jul 2017
Location: Phoenix
Device: Kindles
Linked Resource Does Not Exist

I'm editing a .azw3 file in calibre. I get the consistent error "The linked resource '../images/00003.png' does not exist".

But, the image does exist and displays in the right hand panel correctly. The file name is correct.

I'm a beginner at this. I've converted one file successfully, but this issue has me stumped. I've even copied other areas in the book that display correctly the same image. Nothing works to remove the error. Here's the html:

10 <p class="calibre1"><a id="p26"></a></p>
11 <img src="../images/00003.png"/><p></p>

The error points to the beginning of line 10. Any ideas as to the cause of this?
dbird is offline   Reply With Quote
Advert
Old 08-07-2017, 11:51 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 20,877
Karma: 20350468
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: K4NT, Galaxy Tab 2(RIP)
Quote:
Originally Posted by dbird View Post
I'm editing a .azw3 file in calibre. I get the consistent error "The linked resource '../images/00003.png' does not exist".

But, the image does exist and displays in the right hand panel correctly. The file name is correct.

I'm a beginner at this. I've converted one file successfully, but this issue has me stumped. I've even copied other areas in the book that display correctly the same image. Nothing works to remove the error. Here's the html:

10 <p class="calibre1"><a id="p26"></a></p>
11 <img src="../images/00003.png"/><p></p>

The error points to the beginning of line 10. Any ideas as to the cause of this?
Line 11 is malformed. look at the <p tag
theducks is offline   Reply With Quote
Old 08-08-2017, 01:17 AM   #3
dbird
Junior Member
dbird began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jul 2017
Location: Phoenix
Device: Kindles
I'm not seeing it. <p> followed by </p> . Anyway, I copied this from another part of the book that seems to not produce any errors. If I remove both p tags, the error stays the same. Yes, I'm a complete html neophyte, but after looking it up, it still seems OK.
dbird is offline   Reply With Quote
Old 08-08-2017, 02:36 AM   #4
dbird
Junior Member
dbird began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jul 2017
Location: Phoenix
Device: Kindles
I've found the issue, but I don't understand why this has changed from the first ebook that I put together. The path to images is: <img src="images/00003.png"/>. I found the answer by using the "Insert image" button.
dbird is offline   Reply With Quote
Old 08-08-2017, 06:37 AM   #5
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 20,877
Karma: 20350468
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: K4NT, Galaxy Tab 2(RIP)
Quote:
Originally Posted by dbird View Post
I'm not seeing it. <p> followed by </p> . Anyway, I copied this from another part of the book that seems to not produce any errors. If I remove both p tags, the error stays the same. Yes, I'm a complete html neophyte, but after looking it up, it still seems OK.
The image tag pair is supposed to be INSIDE the block level tags (p,div,h# are block level)
theducks is offline   Reply With Quote
Advert
Old 08-08-2017, 06:51 AM   #6
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 81,458
Karma: 75601787
Join Date: Nov 2006
Location: UK
Device: Kindle Voyage, iPad Pro 10.5", iPhone 6
Quote:
Originally Posted by dbird View Post
I've found the issue, but I don't understand why this has changed from the first ebook that I put together. The path to images is: <img src="images/00003.png"/>. I found the answer by using the "Insert image" button.
If the path was wrong, the image certainly shouldn't have displayed correctly, which you say it did.
HarryT is offline   Reply With Quote
Old 08-08-2017, 06:52 AM   #7
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 81,458
Karma: 75601787
Join Date: Nov 2006
Location: UK
Device: Kindle Voyage, iPad Pro 10.5", iPhone 6
Quote:
Originally Posted by theducks View Post
The image tag pair is supposed to be INSIDE the block level tags (p,div,h# are block level)
Perfectly true, but pretty much all browsers and renderers will display an image that's outside a block.
HarryT is offline   Reply With Quote
Old 08-09-2017, 02:41 AM   #8
dbird
Junior Member
dbird began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jul 2017
Location: Phoenix
Device: Kindles
The whole issue to me is still not clear. The reason now, is because else where in the file I have the image path as: <img alt="Image" src="../images/00004.png"/>.

There is only one image in the file. Now, both paths yield the same result even though they are different. (No errors.)

This smells like a bug to me. Or, maybe a feature?
dbird is offline   Reply With Quote
Old 08-09-2017, 02:58 AM   #9
dbird
Junior Member
dbird began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jul 2017
Location: Phoenix
Device: Kindles
Quote:
Originally Posted by theducks View Post
The image tag pair is supposed to be INSIDE the block level tags (p,div,h# are block level)
Are you sure? When I use the calibre "Insert Image" button, all it inserts is: <img alt="Image" src="images/00004.png" />. No block level tags.

In playing with this, I notice that the above path is produced when I insert the image into a subfile (part0003.html) which I inserted into the book (post conversion). The path <img alt="Image" src="../images/00004.png"/> was produced when I inserted the same image into a subfile which originated with the initial conversion to .azw3.

I have saved the book file, but not re-opened it again after closing the calibre editor. I've noticed that the subfiles names are changed after re-opening. Hm!
dbird is offline   Reply With Quote
Old 08-09-2017, 03:06 AM   #10
dbird
Junior Member
dbird began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jul 2017
Location: Phoenix
Device: Kindles
Well. Sure enough, after saving the book, exiting the editor, and reopening the book for editing, the subfiles have been renamed, as expected. But, all of the image paths now are uniform with "../images/00001.png".

For me the lesson here is to use the calibre button for inserting and fixing images, rather than messing with the html, then let "nature" take it's course. (Mine not to reason why, mine just to do or die.) LOL
dbird is offline   Reply With Quote
Old 08-09-2017, 04:20 AM   #11
Divingduck
Guru
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 882
Karma: 1216240
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
Quote:
Originally Posted by dbird View Post
The whole issue to me is still not clear.
...
This smells like a bug to me. Or, maybe a feature?
No. For me it looks more for an accidental error.

The original code seems to be something like
<p class="calibre1"><a id="p26"></a><img src="../images/00003.png"/></p>
with maybe something additional between </a> and <img
Usually this behavior happen by a S&R where the automatic code error correction add missing start and end tag's to become a valid HTML code. Or because of an accidental CR key stroke while the cursor was at this position in the active code view window. Something like that.
Divingduck is offline   Reply With Quote
Old 08-09-2017, 04:27 AM   #12
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 81,458
Karma: 75601787
Join Date: Nov 2006
Location: UK
Device: Kindle Voyage, iPad Pro 10.5", iPhone 6
Quote:
Originally Posted by dbird View Post
Are you sure? When I use the calibre "Insert Image" button, all it inserts is: <img alt="Image" src="images/00004.png" />. No block level tags.
Semantically, an image is nothing more than an alternate representation of the text equivalent (the "alt" attribute of the image), thus it needs to be contained within the same type of block that text is contained within: either <p> or <div>.

The fact that browsers (and book readers) will in reality display images that are not contained within blocks shouldn't be taken as a reason not to put them in blocks. The easiest thing to do is just to surround the image with <div> ... </div> tags.
HarryT is offline   Reply With Quote
Old 08-09-2017, 07:28 AM   #13
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 10,020
Karma: 58577777
Join Date: Nov 2007
Location: Toronto
Device: Wife: Touch, Arc, Vox Me: Nexus 7, Glo
Remember that the path you specify is RELATIVE to the location of the HTML file.

If the HTML file is not in a folder / directory / whatever you call it then the image path will be images/00001.png

If the HTML file is in a folder then the image path will be ../images/00001.png

Sent from my Nexus 7 using Tapatalk
PeterT is offline   Reply With Quote
Old 08-09-2017, 08:44 AM   #14
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 20,877
Karma: 20350468
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: K4NT, Galaxy Tab 2(RIP)
Quote:
Originally Posted by HarryT View Post
Perfectly true, but pretty much all browsers and renderers will display an image that's outside a block.
True! Which is the problem when trying to find the issue when your Device, does not (like the older ADE based ones)
theducks is offline   Reply With Quote
Old 08-09-2017, 08:51 AM   #15
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 20,877
Karma: 20350468
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: K4NT, Galaxy Tab 2(RIP)
Quote:
Originally Posted by dbird View Post
Are you sure? When I use the calibre "Insert Image" button, all it inserts is: <img alt="Image" src="images/00004.png" />. No block level tags.

In playing with this, I notice that the above path is produced when I insert the image into a subfile (part0003.html) which I inserted into the book (post conversion). The path <img alt="Image" src="../images/00004.png"/> was produced when I inserted the same image into a subfile which originated with the initial conversion to .azw3.

I have saved the book file, but not re-opened it again after closing the calibre editor. I've noticed that the subfiles names are changed after re-opening. Hm!
Calibre (and Sigil)expects you to insert the image INTO the (placements) controlling block. eg you might want to 'float' it, scale it...
theducks is offline   Reply With Quote
Reply

Tags
error, image, resource

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Highlighting linked text Julanna ePub 26 11-09-2014 04:32 PM
Linked TOC -- code GraciousMe Sigil 4 11-20-2012 03:24 AM
Linked endnotes in epub virtual_ink ePub 30 08-30-2011 04:47 PM
Book Designer and linked footnotes Patricia Workshop 2 12-04-2009 01:02 PM
How to create linked TOC? squawker Sony Reader 1 03-04-2007 08:20 AM


All times are GMT -4. The time now is 12:55 PM.


MobileRead.com is a privately owned, operated and funded community.