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

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 09-14-2019, 02:08 PM   #1
hyegeek
Groupie
hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.
 
Posts: 156
Karma: 258122
Join Date: Dec 2007
Device: Ez Reader (hanlin v3)
A recent DRM free purchase from Amazon is not working on the Linux version

Kind of a long title, but it covers what is going wrong.

Trying to load either the azw file (from XP version of kindle) or the mobi file (from Win7 Version of kindle) both get a traceback when tyring to load them on the Linux version of calibre.

I can load (at least the mobi version) into the windows version of calibre without errors. I then converted it to an epub. Still no errors. I took that epub and tried to load it in the linux version and once again a trace back.

Both windows and linux are running version 3.48 of calibre.

Here's the traceback

Code:
calibre 3.48  embedded-python: False is64bit: True
Linux-4.19.71-gentoo.zfs-x86_64-Intel-R-_Core-TM-_i7-4790_CPU_@_3.60GHz-with-gentoo-2.6 Linux ('64bit', 'ELF')
('Linux', '4.19.71-gentoo.zfs', '#1 SMP PREEMPT Sun Sep 8 05:11:07 PDT 2019')
Python 2.7.15
Linux: ('Gentoo Base System', '2.6', '')
Interface language: None
Successfully initialized third party plugins: Find Duplicates (1, 6, 3)
Traceback (most recent call last):
  File "/usr/lib64/calibre/calibre/gui2/viewer/main.py", line 1025, in load_ebook
    self.metadata.show_metadata(self.iterator.mi, self.iterator.book_format)
  File "/usr/lib64/calibre/calibre/gui2/viewer/ui.py", line 102, in show_metadata
    html = render_html(mi, css(), True, self, render_data_func=render_data)
  File "/usr/lib64/calibre/calibre/gui2/book_details.py", line 113, in render_html
    use_roman_numbers=config['use_roman_numerals_for_series_number'])
  File "/usr/lib64/calibre/calibre/gui2/viewer/ui.py", line 99, in render_data
    default_author_link=default_author_link()
  File "/usr/lib64/calibre/calibre/ebooks/metadata/book/render.py", line 128, in mi_to_html
    val = comments_to_html(val)
  File "/usr/lib64/calibre/calibre/library/comments.py", line 103, in comments_to_html
    pTag = result.new_tag('p')
TypeError: 'NoneType' object is not callable
Any ideas?
hyegeek is offline   Reply With Quote
Old 09-14-2019, 02:54 PM   #2
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: 12,141
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
I'm not an expert in reading the config issue but are you running the official calibre version or is it from the distribution's repository?

If from the repository replace it by the official version.
PeterT is offline   Reply With Quote
Advert
Old 09-14-2019, 03:07 PM   #3
hyegeek
Groupie
hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.
 
Posts: 156
Karma: 258122
Join Date: Dec 2007
Device: Ez Reader (hanlin v3)
Gentoo does a compile of the original sources. Should be no additional patches.

I suspect one of the dependencies is having an issue, but I can't make heads or tails out of the trackback to figure out which one to try to fix.
hyegeek is offline   Reply With Quote
Old 09-14-2019, 06:57 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,826
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Use the official calibre linux build instead of the gentoo package and you will be fine.
kovidgoyal is offline   Reply With Quote
Old 09-14-2019, 07:00 PM   #5
hyegeek
Groupie
hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.
 
Posts: 156
Karma: 258122
Join Date: Dec 2007
Device: Ez Reader (hanlin v3)
I will try that. However, I've been using the gentoo build for years and this is the first time I've run into something like this. If you have any ideas on what is failing, I'd love to try to dig deeper and get it corrected.
hyegeek is offline   Reply With Quote
Advert
Old 09-14-2019, 07:34 PM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,826
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
That traceback refers to BeautifulSoup. Probably a version incompatibility somewhere.
kovidgoyal is offline   Reply With Quote
Old 09-14-2019, 07:53 PM   #7
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Yes, the Gentoo ebuild from the Portage tree strips Calibre's vendored BeautifulSoup package.

(Mine doesn't).
NiLuJe is offline   Reply With Quote
Old 09-14-2019, 08:41 PM   #8
hyegeek
Groupie
hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.
 
Posts: 156
Karma: 258122
Join Date: Dec 2007
Device: Ez Reader (hanlin v3)
Thanks. The official build certainly does work. Sounds like a bug report to gentoo might also be in order.

Thanks for the help.
hyegeek is offline   Reply With Quote
Old 09-14-2019, 09:02 PM   #9
hyegeek
Groupie
hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.hyegeek ought to be getting tired of karma fortunes by now.
 
Posts: 156
Karma: 258122
Join Date: Dec 2007
Device: Ez Reader (hanlin v3)
NiLuJe,

In your ebuild, I see you add some additional patches as well as restoring Calibre's BeautifulSoap. Is that something you would recommend over the official calibre install?
hyegeek is offline   Reply With Quote
Old 09-14-2019, 09:15 PM   #10
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@hyegeek: It certainly never caused any trouble on my end. But, for understandable reasons, expect to be asked to try with official binary installs if you ever need support .

Do note that this patch contains hard-coded paths, so you might want to drop it (or adapt it). Or simply forget about it if you're not using a Kobo .

Last edited by NiLuJe; 09-14-2019 at 09:22 PM.
NiLuJe is offline   Reply With Quote
Old 09-14-2019, 10:19 PM   #11
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,826
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
calibre does nothave a vendored beautifulsoup anymore, hasn't had one since it switched to bs4
kovidgoyal is offline   Reply With Quote
Old 09-15-2019, 12:16 AM   #12
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
So basically, yet another Linux distribution that completely inaccurately modifies calibre in order to strip out dependencies, but cannot even do it correctly.

calibre's internal Beautifulsoup.py was a fork of Beautifulsoup3 which changed some things for reasons I don't know and didn't keep track of, but like the other handful of vendored libraries, this can generally be assumed to have been:
  • a legacy of calibre's venerable development history, AND
  • something which did not work upstream, which was either not upstreamable OR upstream was dead and therefore could not accept anything


So instead of working with upstream to try to get this resolved, and instead of respecting the wishes of upstream, they chose to strip it out anyway. I do not do this in my Arch Linux package!
Then, once I do in fact work with upstream to get this properly resolved (by migrating to stock bs4), their completely incorrect downstream modifications no longer work, because the API wrapper interface which they have always broken for News recipes, is also now generally broken for everything that is using the new calibre/ebooks/Beautifulsoup.py which is a *wrapper* for bs4.

Tell Gentoo to stop removing this, and next time they want to patch something out they should use a .patch which will stop cleanly applying if the code they are patching has changed in the meantime.

Also, while you are at it, tell them to stop using the Debian project's filthy lying patch which removes the plugin downloader for totally illegitimate reasons.
(Apparently some vaporware standard which died in 2009 is the only technology which Gentoo will allow for users to interactively download plugins from a centralized HTTPS server. Gag me.)
eschwartz is offline   Reply With Quote
Old 09-15-2019, 12:17 AM   #13
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
@NiLuJe, seems like http://trac.ak-team.com is a 502 gateway error.
eschwartz is offline   Reply With Quote
Old 09-15-2019, 07:30 AM   #14
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@kovidgoyal: Good to know, thanks . The ebuild is still murdering that shim though, as Eli just explained .

@eschwartz: Yep, a build job ate through /tmp, fixed it .

Last edited by NiLuJe; 09-15-2019 at 11:12 AM.
NiLuJe is offline   Reply With Quote
Old 09-15-2019, 11:08 AM   #15
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
@NiLuJe, also you should be able to remove all xdg/mime/desktop hacks due to https://github.com/kovidgoyal/calibre/pull/988

And python-html2text at least is definitely a missing dependency (and beatifulsoup3 is an outdated one as Kovid noted). I don't know if Gentoo builds run in a minimal chroot like Arch Linux ones do, which tends to discover missing dependencies but either way, you should run the testsuite as it will check for both explicitly. The minimal chroot build would ensure that an unspecified dep pulled in by other packages on the system would produce failures.

Also yes, you should probably use a system mathjax, see e.g. https://git.archlinux.org/svntogit/c...es/calibre#n69
But you might want a package for https://www.archlinux.org/packages/c...apydscript-ng/ as it will dramatically speed up building all .pyj, and you do need to regenerate the server javascript.
eschwartz is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Free (nook/Kindle/iTunes/DRM-free) Chasing Superwoman [Xtian Working Parent Advice] ATDrake Deals and Resources (No Self-Promotion or Affiliate Links) 0 05-05-2016 01:11 PM
Amazon Local App First: Free Voucher to Purchase Select Kindle Books for $1 hwlester Deals and Resources (No Self-Promotion or Affiliate Links) 0 09-08-2013 11:19 AM
Calibre Sync on Android stopped working properly with recent version of Calibre? khahoon Calibre 5 07-06-2013 08:14 AM
Free (DRM-free multi formats) Working Out [Modern BDSM Workplace Erotic Romance] ATDrake Deals and Resources (No Self-Promotion or Affiliate Links) 0 12-15-2012 01:56 AM
Sort by recent first not working Barty Amazon Kindle 4 10-25-2010 05:06 PM


All times are GMT -4. The time now is 10:21 AM.


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