Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 09-20-2024, 04:24 PM   #1
foosion
Evangelist
foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.
 
Posts: 415
Karma: 41524
Join Date: Sep 2011
Device: Kobo Libra 2 & Clara BW
Unexpected empty source

The Check book function has marked every html file with Unexpected empty source and noted line 1 column 0.

The first few lines are

Code:
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
What's the problem?

BTW, this is a book in which just about every CSS entry is a calibre class. It's the Maude translation of War and Peace. Duke Classics is claiming a 2012 copyright.
foosion is offline   Reply With Quote
Old 09-20-2024, 04:45 PM   #2
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 76,139
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Try this code instead.

Code:
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">
<head>
Or this code.

Code:
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" lang="en-US" xml:lang="en-US">
<head>

Last edited by JSWolf; 09-20-2024 at 04:49 PM.
JSWolf is offline   Reply With Quote
Advert
Old 09-20-2024, 04:57 PM   #3
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,339
Karma: 6700866
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
I don't think the issue is in the first line. More likely the checker is simply falling back to the first line and the problem is elsewhere on the page.

Can we see the entire page, or the entire book if available? Is it epub2 or epub3?
Karellen is offline   Reply With Quote
Old 09-20-2024, 05:06 PM   #4
foosion
Evangelist
foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.
 
Posts: 415
Karma: 41524
Join Date: Sep 2011
Device: Kobo Libra 2 & Clara BW
Here's the first html file:

Code:
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>War and Peace</title>
<meta name="author" content="Leo Nikoleyevich Tolstoy"/>
<meta name="generator" content="Duke Classics"/>
<link href="stylesheet.css" type="text/css" rel="stylesheet"/><style type="text/css">
		</style></head>
<body class="calibre">
<h1 class="title" id="calibre_toc_1">WAR AND PEACE</h1>

<h2 class="decoration">* * *</h2>
<h2 class="decoration">LEO NIKOLEYEVICH TOLSTOY</h2><div class="calibre2" style="text-align:center"><em class="calibre3">Translated by</em></div><h2 class="decoration">AYLMER MAUDE</h2><h2 class="decoration">LOUISE SHANKS MAUDE</h2>

<div class="center"><img src="logo_s.jpg" alt="Duke Classics" class="calibre4"/></div>

<div class="calibre1" id="calibre_pb_2"></div></body>
</html>
and the whole thing scrambled is attached.

EDIT: Alas, Jon's suggestions didn't help.
Attached Files
File Type: epub War and Peace - Leo Tolstoy_scrambled.epub (2.28 MB, 18 views)

Last edited by foosion; 09-20-2024 at 05:11 PM.
foosion is offline   Reply With Quote
Old 09-20-2024, 05:16 PM   #5
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,339
Karma: 6700866
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
Thanks.

PHP Code:
<head>
  <
title>Scrambled</title>
  <
meta name="author" content="Leo Nikoleyevich Tolstoy"/>
  <
meta name="generator" content="Duke Classics"/>
  <
link href="stylesheet.css" type="text/css" rel="stylesheet"/>
  <
style type="text/css">  </style>
</
head
The problem is the <style> tag with empty / white spaces for a value.
Delete that line and the error will be cleared.

== Edit ==
You then need to relink the stylesheet to the html page. That will fix the error.

Last edited by Karellen; 09-20-2024 at 05:25 PM.
Karellen is offline   Reply With Quote
Advert
Old 09-20-2024, 05:25 PM   #6
foosion
Evangelist
foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.
 
Posts: 415
Karma: 41524
Join Date: Sep 2011
Device: Kobo Libra 2 & Clara BW
Quote:
Originally Posted by Karellen View Post
Thanks.

PHP Code:
<head>
  <
title>Scrambled</title>
  <
meta name="author" content="Leo Nikoleyevich Tolstoy"/>
  <
meta name="generator" content="Duke Classics"/>
  <
link href="stylesheet.css" type="text/css" rel="stylesheet"/>
  <
style type="text/css">  </style>
</
head
The problem is the <style> tag with empty / white spaces for a value.
Delete that line and the error will be cleared.
That did it. Thank you!

386 errors (one per part) seemed a bit much, even if it had no effect on the actual rendering of the book.

Out of idle curiosity, I wonder why the Calibre editor didn't identify that line. Or why the publisher, which obviously used Calibre, didn't notice and fix it.

Now I just have to decide if I want to read this translation or the Briggs version.

Quote:
== Edit ==
You then need to relink the stylesheet to the html page. That will fix the error.
This was not necessary. Editor and viewer found the stylesheet as is.

Last edited by foosion; 09-20-2024 at 05:33 PM.
foosion is offline   Reply With Quote
Old 09-20-2024, 06:31 PM   #7
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 40,013
Karma: 154919858
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by foosion View Post
Out of idle curiosity, I wonder why the Calibre editor didn't identify that line. Or why the publisher, which obviously used Calibre, didn't notice and fix it.
Perhaps that structure not being marked as an error by epubcheck had something to do with that?
DNSB is offline   Reply With Quote
Old 09-20-2024, 07:05 PM   #8
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,339
Karma: 6700866
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
There are a few errors that don't go to the actual source of the error.

Even epubCheck shows the same behaviour at times. One that comes to mind is forgetting to add properties="svg" in the opf. epubCheck will tell you it is missing, but not take you to where it should be fixed. It won't even open the file.

As for the publisher... some do weird things.

Also, I'd rethink not linking the stylesheet. Calibre is quite forgiving with errors, ereaders may not be. For a 6 second job, I wouldn't even question it. I would just do it.
Karellen is offline   Reply With Quote
Old 09-20-2024, 07:13 PM   #9
foosion
Evangelist
foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.
 
Posts: 415
Karma: 41524
Join Date: Sep 2011
Device: Kobo Libra 2 & Clara BW
Quote:
Originally Posted by DNSB View Post
Perhaps that structure not being marked as an error by epubcheck had something to do with that?
Or maybe they just did a Calibre conversion and added their own copyright. The text seems the same as the Project Gutenberg version.

Based on some comments here I had thought epubcheck was more rigorous than Calibre editor's check, but I guess they're just different.
foosion is offline   Reply With Quote
Old 09-20-2024, 07:26 PM   #10
foosion
Evangelist
foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.
 
Posts: 415
Karma: 41524
Join Date: Sep 2011
Device: Kobo Libra 2 & Clara BW
Quote:
Originally Posted by Karellen View Post
There are a few errors that don't go to the actual source of the error.

Even epubCheck shows the same behaviour at times. One that comes to mind is forgetting to add properties="svg" in the opf. epubCheck will tell you it is missing, but not take you to where it should be fixed. It won't even open the file.

As for the publisher... some do weird things.

Also, I'd rethink not linking the stylesheet. Calibre is quite forgiving with errors, ereaders may not be. For a 6 second job, I wouldn't even question it. I would just do it.
I'd say the major weird thing this publisher did is take an out of copyright work, run it through a Calibre conversion and add a copyright.

Turns out the stylesheet is in the same directory as the html files, so the current ref is correct. The change would be to move the stylesheet to ../styles, then link.
foosion is offline   Reply With Quote
Old 09-20-2024, 07:40 PM   #11
foosion
Evangelist
foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.
 
Posts: 415
Karma: 41524
Join Date: Sep 2011
Device: Kobo Libra 2 & Clara BW
Every time I think I'm getting a handle on CSS and epub, something new, like this, turns up.

Thanks y'all for your patience as I learn how these things work.

Last edited by foosion; 09-20-2024 at 08:49 PM.
foosion is offline   Reply With Quote
Old 09-20-2024, 09:12 PM   #12
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 40,013
Karma: 154919858
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by foosion View Post
Or maybe they just did a Calibre conversion and added their own copyright. The text seems the same as the Project Gutenberg version.

Based on some comments here I had thought epubcheck was more rigorous than Calibre editor's check, but I guess they're just different.
Other than stylelint, calibre is the only program I've seen that will complain about empty space.

Remember that epubcheck is specific to ePub while stylelint is (X)HTML oriented. Generally, I've found calibre's check to be much less useful than epubcheck since quite a few errors that check does not detect are picked up by epubcheck.
DNSB is offline   Reply With Quote
Old 09-20-2024, 09:14 PM   #13
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 40,013
Karma: 154919858
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by foosion View Post
Turns out the stylesheet is in the same directory as the html files, so the current ref is correct. The change would be to move the stylesheet to ../styles, then link.
You can re-arrange an ePub in Sigil and calibre's ebook-editor though I find Sigil's Arrange to Sigil Norm tool to be easier to use.
DNSB is offline   Reply With Quote
Old 09-20-2024, 09:22 PM   #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: 30,421
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by foosion View Post
Every time I think I'm getting a handle on CSS and epub, something new, like this, turns up.

Thanks y'all for your patience as I learn how these things work.
It was a warning of basically do nothing code.
<style> </style>
It may not have been your intention to delete the contents and this gives you a warning to undo /abort an edit that went bad.

Personally, I like Lean, Neat code
theducks is offline   Reply With Quote
Old 09-21-2024, 07:22 AM   #15
foosion
Evangelist
foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.
 
Posts: 415
Karma: 41524
Join Date: Sep 2011
Device: Kobo Libra 2 & Clara BW
Quote:
Originally Posted by DNSB View Post
You can re-arrange an ePub in Sigil and calibre's ebook-editor though I find Sigil's Arrange to Sigil Norm tool to be easier to use.
In the editor, wouldn't it just be the arrange into folders function, which seems rather easy?
foosion is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Updating source while running from source ownedbycats Development 2 01-30-2022 05:32 AM
Import Data sees new empty folders as not empty mivetters Library Management 6 12-21-2019 03:18 PM
[Metadata Source Plugin] Empty Plugin? (Fake Identifier) mneimeyer Plugins 3 11-11-2019 08:07 PM
Well. That's unexpected. skb Writers' Corner 5 05-06-2019 10:38 PM
lots of empty folders, "no suitable source format found" -- clueless etitameh Calibre 11 08-08-2010 09:30 PM


All times are GMT -4. The time now is 11:53 AM.


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