Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 12-11-2022, 06:31 AM   #1
mrprobert
Connoisseur
mrprobert began at the beginning.
 
Posts: 60
Karma: 46
Join Date: Mar 2017
Device: None
Language metadata tag causes embedded python error

Hi,

An epub I have has the language metadata tag set to: <dc:language>eng</dc:language>. Invoking the metadata editor changes the tag to: <dc:language></dc:language>, which I assume is an incorrect. Invoking the editor a second time throws an embedded python error.

To reproduce this behavior:
  1. Create a simple epub and change the metadata language tag in the opf to: <dc:language>eng</dc:language>
  2. Open the metadata editor and then click OK.
  3. Opening the metadata editor a second time throws an embedded python error.

I can get around this by editing the opf and deleting the language tag but I wonder if there is a better way to deal with this situation.
mrprobert is offline   Reply With Quote
Old 12-11-2022, 08:29 AM   #2
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,348
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
https://www.mobileread.com/forums/sh...d.php?t=350440
DiapDealer is online now   Reply With Quote
Advert
Old 12-11-2022, 09:58 AM   #3
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,448
Karma: 5703586
Join Date: Nov 2009
Device: many
Yes, "eng" is not a valid dc:language value. And the python error when using an empty language tag has already been fixed in master. Use the metadata editor and select a the dc language tag and select a valid language.
KevinH is offline   Reply With Quote
Old 12-11-2022, 03:43 PM   #4
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by KevinH View Post
Yes, "eng" is not a valid dc:language value.
Also see my post from a few months ago:

where I described the "eng" language mistake in more detail.

In EPUB metadata (and HTML lang):
  • ✗ eng
  • ✓ en = English
  • ✓ en-US = English (United States)
  • ✓ en-GB = English (British)
  • ✗ en-UK

Quote:
Originally Posted by KevinH View Post
Use the metadata editor and select a the dc language tag and select a valid language.
Hmmmm... this seems like a common enough error... (We've had many posts like this over the years.)

Should there maybe be some auto-substitution of eng -> en instead of throwing it away / blanking it out?

Last edited by Tex2002ans; 12-11-2022 at 03:45 PM.
Tex2002ans is offline   Reply With Quote
Old 12-11-2022, 03:58 PM   #5
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,348
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
No. We're not going down the rabbit hole of trying to auto-fix incorrect language codes.
DiapDealer is online now   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Embedded Python Error on Windows 7 r5dehr9qcs Sigil 11 04-27-2022 06:06 AM
Sigil not fully launching - Embedded Python error BookWalker Sigil 54 01-08-2021 09:08 AM
Metadata error setting language thiago.eec Library Management 4 06-11-2019 09:01 PM
fetch-ebook-metadata.exe python error dzog Calibre 2 11-04-2016 05:26 AM
Embedded Python Error? darkbreath Sigil 13 10-14-2016 07:35 AM


All times are GMT -4. The time now is 03:10 PM.


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