Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 607782 - Conversion to epub format fails
Conversion to epub format fails
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: calibre (Show other bugs)
13
x86_64 Linux
low Severity medium
: ---
: ---
Assigned To: Kevin Fenzi
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-24 15:19 EDT by Andras Simon
Modified: 2011-01-22 15:32 EST (History)
6 users (show)

See Also:
Fixed In Version: calibre-0.7.38-3.fc14
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-01-22 15:29:10 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Andras Simon 2010-06-24 15:19:05 EDT
Description of problem:

ebook-convert test.txt test.epub

fails with 

Traceback (most recent call last):
  File "/usr/bin/ebook-convert", line 19, in <module>
    sys.exit(main())
  File "/usr/lib/calibre/calibre/ebooks/conversion/cli.py", line 254, in main
    plumber.run()
  File "/usr/lib/calibre/calibre/ebooks/conversion/plumber.py", line 919, in run
    self.opts, self.log)
  File "/usr/lib/calibre/calibre/ebooks/epub/output.py", line 160, in convert
    cm(self.oeb, self.opts, self.log)
  File "/usr/lib/calibre/calibre/ebooks/oeb/transforms/cover.py", line 85, in __call__
    self.insert_cover()
  File "/usr/lib/calibre/calibre/ebooks/oeb/transforms/cover.py", line 170, in insert_cover
    width, height = self.inspect_cover(href)
  File "/usr/lib/calibre/calibre/ebooks/oeb/transforms/cover.py", line 151, in inspect_cover
    if x.href == urlnormalize(href):
  File "/usr/lib/calibre/calibre/ebooks/oeb/base.py", line 322, in urlnormalize
    parts = urlparse(href)
  File "/usr/lib/python2.6/urlparse.py", line 108, in urlparse
    tuple = urlsplit(url, scheme, allow_fragments)
  File "/usr/lib/python2.6/urlparse.py", line 147, in urlsplit
    i = url.find(':')
AttributeError: 'NoneType' object has no attribute 'find'

for every (including empty) text file test.txt.

Version-Release number of selected component (if applicable):

0.6.55-1.fc12

How reproducible:

always

Steps to Reproduce:

Run 

ebook-convert test.txt test.epub

with test.txt empty (or any text file)
 
Actual results:

Error message, as above

Expected results:

An epub file named test.epub

Additional info:

None.
Comment 1 Frank Murphy 2010-06-24 18:33:55 EDT
What version of python-cssutils are you running?

"rpm -q python-cssutils" will tell you.
Comment 2 Andras Simon 2010-06-24 20:37:22 EDT
python-cssutils-0.9.6-1.fc12.noarch
Comment 3 Frank Murphy 2010-06-25 05:45:55 EDT
This version of Calibre from Rawhide seems to fix that problem
http://koji.fedoraproject.org/koji/buildinfo?buildID=177286

Would you be willing to test it, if it doesn't pull in to much?
Comment 4 Leo 2010-06-28 14:22:46 EDT
I ran into this one as well.  I tried but couldn't install the f14 version of calibre you linked above - the dependency failures are below.

Is a possible solution to add a check for the minimum required version of python-cssutils to the calibre package?  I downgraded calibre to get it working while awaiting a fix: yum downgrade calibre

yum install calibre-0.7.1-2.fc14.x86_64.rpm 
Loaded plugins: fastestmirror, presto, refresh-packagekit
Loading mirror speeds from cached hostfile
 * fedora: mirror.stanford.edu
 * rpmfusion-free: mirror.web-ster.com
 * rpmfusion-free-updates: mirror.web-ster.com
 * rpmfusion-nonfree: mirror.web-ster.com
 * rpmfusion-nonfree-updates: mirror.web-ster.com
 * updates: mirror.stanford.edu
Setting up Install Process
Examining calibre-0.7.1-2.fc14.x86_64.rpm: calibre-0.7.1-2.fc14.x86_64
Marking calibre-0.7.1-2.fc14.x86_64.rpm as an update to calibre-0.6.42-1.fc13.x86_64
Resolving Dependencies
--> Running transaction check
---> Package calibre.x86_64 0:0.7.1-2.fc14 set to be updated
--> Processing Dependency: libMagickCore.so.3()(64bit) for package: calibre-0.7.1-2.fc14.x86_64
--> Processing Dependency: libMagickWand.so.3()(64bit) for package: calibre-0.7.1-2.fc14.x86_64
--> Processing Dependency: libpodofo.so.0.8.1()(64bit) for package: calibre-0.7.1-2.fc14.x86_64
--> Processing Dependency: libpoppler.so.6()(64bit) for package: calibre-0.7.1-2.fc14.x86_64
--> Finished Dependency Resolution
Error: Package: calibre-0.7.1-2.fc14.x86_64 (/calibre-0.7.1-2.fc14.x86_64)
           Requires: libMagickCore.so.3()(64bit)
Error: Package: calibre-0.7.1-2.fc14.x86_64 (/calibre-0.7.1-2.fc14.x86_64)
           Requires: libMagickWand.so.3()(64bit)
Error: Package: calibre-0.7.1-2.fc14.x86_64 (/calibre-0.7.1-2.fc14.x86_64)
           Requires: libpoppler.so.6()(64bit)
Error: Package: calibre-0.7.1-2.fc14.x86_64 (/calibre-0.7.1-2.fc14.x86_64)
           Requires: libpodofo.so.0.8.1()(64bit)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
Comment 5 Kevin Fenzi 2010-06-28 16:17:41 EDT
>I ran into this one as well.  I tried but couldn't install the f14 version of
>calibre you linked above - the dependency failures are below.

Yes, this will not work. What version of fedora are you on? f12? f13?

>Is a possible solution to add a check for the minimum required version of
>python-cssutils to the calibre package?  I downgraded calibre to get it working
>while awaiting a fix: yum downgrade calibre

yes, it already has such a dep, but the problem is that 0.9.7 of python-cssutils which fixes this is not yet released, so we can't build it and get it to you. ;( 

They are on rc3, so hopefully it will be out soon and I will push updates as soon as it is built.
Comment 6 Leo 2010-06-28 16:34:59 EDT
I am running fedora 13.  If the dependency were for the correct version of python-cssutils, would that keep from updating calibre to a version that no longer works?  Wouldn't specifying minimum version of ptyhhon-cssutils >= 0.9.7 fix it?

In the meantime, I added "exclude=calibre*" to /etc/yum.conf after doing the "yum downgrade calibre".
Comment 7 Kevin Fenzi 2010-06-28 16:44:19 EDT
Yes, the Requires: python-cssutils >= 0.9.7 would fix this, but sadly as I mentioned there isn't a 0.9.7 final release version out yet. Only rc3, so we will need to wait until this ships to push it into fedora. 

You can also use a specific version in the exclude, so it will notice when there is a newer one. ie, 'exclude=calibre-0.6.55-1'
Comment 8 Leo 2010-06-28 17:42:13 EDT
Thank you for the exclude tip - I've added the version to it.

What I was wondering was if there was an exclude that would keep the version of calibre from installing without the corresponding python-css.  But I guess it would be even more confusing if yum update would then produce error messages that would confuse many people.  If the corresponding python-css was not yet available, would that result in error messages, or would it just not attempt to update calibre?

Thanks for all the hard work you guys do keeping the gazillion packages working!
Comment 9 Kevin Fenzi 2010-06-28 18:39:50 EDT
Well, it should work out fine because the next one I push out will have the dep on 0.9.7. ;)
Comment 10 Bug Zapper 2010-11-03 08:54:06 EDT
This message is a reminder that Fedora 12 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 12.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '12'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 12's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 12 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 11 Kevin Fenzi 2010-11-03 14:23:02 EDT
Can you try this again with the latest f13 version?
Comment 12 Andras Simon 2010-11-03 14:39:37 EDT
(In reply to comment #11)
> Can you try this again with the latest f13 version?

I did, with the same result. That's why I incremented the version number.

Here's the backtrace after running 

ebook-convert test.txt test.epub

(I tried it both with empty test.txt and with one that has  a few ascii character in it) with a little context: 

Generating default cover
Failed to generate default cover
Traceback (most recent call last):
  File "/usr/bin/ebook-convert", line 19, in <module>
    sys.exit(main())  
  File "/usr/lib64/calibre/calibre/ebooks/conversion/cli.py", line 254, in main
    plumber.run()
  File "/usr/lib64/calibre/calibre/ebooks/conversion/plumber.py", line 919, in run
    self.opts, self.log)
  File "/usr/lib64/calibre/calibre/ebooks/epub/output.py", line 160, in convert
    cm(self.oeb, self.opts, self.log)
  File "/usr/lib64/calibre/calibre/ebooks/oeb/transforms/cover.py", line 85, in __call__
    self.insert_cover()
  File "/usr/lib64/calibre/calibre/ebooks/oeb/transforms/cover.py", line 170, in insert_cover
    width, height = self.inspect_cover(href)
  File "/usr/lib64/calibre/calibre/ebooks/oeb/transforms/cover.py", line 151, in inspect_cover
    if x.href == urlnormalize(href):
  File "/usr/lib64/calibre/calibre/ebooks/oeb/base.py", line 322, in urlnormalize
    parts = urlparse(href)
  File "/usr/lib64/python2.6/urlparse.py", line 108, in urlparse
    tuple = urlsplit(url, scheme, allow_fragments)
  File "/usr/lib64/python2.6/urlparse.py", line 147, in urlsplit
    i = url.find(':') 
AttributeError: 'NoneType' object has no attribute 'find'
Comment 13 Kevin Fenzi 2010-11-03 17:51:11 EDT
ok. Can you try again with the latest calibre from: 

http://repos.fedorapeople.org/repos/kevin/calibre/
Comment 14 Andras Simon 2010-11-03 19:10:58 EDT
(In reply to comment #13)
> ok. Can you try again with the latest calibre from: 
> 
> http://repos.fedorapeople.org/repos/kevin/calibre/

I get a different error with this:

[...]
Trimming unused files from manifest...
Traceback (most recent call last):
  File "/usr/bin/ebook-convert", line 19, in <module>
    sys.exit(main())
  File "/usr/lib64/calibre/calibre/ebooks/conversion/cli.py", line 254, in main
    plumber.run()
  File "/usr/lib64/calibre/calibre/ebooks/conversion/plumber.py", line 927, in run
    trimmer(self.oeb, self.opts)
  File "/usr/lib64/calibre/calibre/ebooks/oeb/transforms/trimmanifest.py", line 57, in __call__
    for href in cssutils.getUrls(item.data):
  File "/usr/lib64/calibre/calibre/ebooks/oeb/base.py", line 1062, in fget
    data = self._parse_css(data)
  File "/usr/lib64/calibre/calibre/ebooks/oeb/base.py", line 1008, in _parse_css
    import_rules = list(data.cssRules.rulesOfType(CSSRule.IMPORT_RULE))
AttributeError: 'CSSRuleList' object has no attribute 'rulesOfType'

(Just to make sure I tried the right version: it's calibre-0.7.24-1.fc13.x86_64)
Comment 15 Kevin Fenzi 2010-11-03 19:36:30 EDT
What version of python-cssutils do you have installed?
Comment 16 Andras Simon 2010-11-03 19:37:21 EDT
(In reply to comment #14)
> (In reply to comment #13)
> > ok. Can you try again with the latest calibre from: 
> > 
> > http://repos.fedorapeople.org/repos/kevin/calibre/
> 
> I get a different error with this:

This was because I forgot to update python-cssutils to 0.9.7.
Now I did, and the error is gone. Thanks!
Comment 17 Andras Simon 2010-11-03 19:40:36 EDT
(In reply to comment #15)
> What version of python-cssutils do you have installed?

[We had a mid-air collision.] The one that caused the error was 0.9.6-1.
Comment 18 Kevin Fenzi 2010-11-03 19:43:10 EDT
ok, so it's working with that version fine?

I'm not sure I can easily upgrade f13, as thats a stable release and this version of calibre changes a lot of things. Will see what happens.
Comment 19 Andras Simon 2010-11-03 20:21:23 EDT
(In reply to comment #18)
> ok, so it's working with that version fine?

This bug is certainly gone.
 
> I'm not sure I can easily upgrade f13, as thats a stable release and this
> version of calibre changes a lot of things. Will see what happens.

Perhaps the fix to this bug could be backported?

Anyway, thanks for looking into this!
Comment 20 Fedora Update System 2011-01-12 19:08:00 EST
calibre-0.7.38-3.fc14,python-cssutils-0.9.7-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/calibre-0.7.38-3.fc14,python-cssutils-0.9.7-1.fc14
Comment 21 Fedora Update System 2011-01-12 19:19:45 EST
calibre-0.7.38-3.fc13,python-cssutils-0.9.7-1.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/calibre-0.7.38-3.fc13,python-cssutils-0.9.7-1.fc13
Comment 22 Fedora Update System 2011-01-13 18:25:59 EST
calibre-0.7.38-3.fc13, python-cssutils-0.9.7-1.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update calibre python-cssutils'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/calibre-0.7.38-3.fc13,python-cssutils-0.9.7-1.fc13
Comment 23 Fedora Update System 2011-01-22 15:27:39 EST
calibre-0.7.38-3.fc13, python-cssutils-0.9.7-1.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 24 Fedora Update System 2011-01-22 15:31:35 EST
calibre-0.7.38-3.fc14, python-cssutils-0.9.7-1.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.