Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 01-21-2011, 05:48 PM   #1
petdr
Junior Member
petdr began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jan 2011
Device: Kindle
Fixing exception in the_age recipe

I've got calibre 0.7.12 installed in ubuntu 8.04 LTS.

It has a recipe for The Age. However this recipe doesn't find the last feed, Columns, when processing www.theage.com.au/text.

So I added the following line to the section that processes the feeds

Code:
	if feed is not None:
	    if articles:
		feeds.append((feed, articles))
which says at the end if we still have a feed and articles add it to all the feeds at the end of processing.

You can find the whole script at http://pastie.org/1485719.

However now when I run this script I get the following error

Code:
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 824, in run
    self.input_plugin)
  File "/usr/lib/calibre/calibre/ebooks/conversion/plumber.py", line 951, in create_oebbook
    reader()(oeb, path_or_stream)
  File "/usr/lib/calibre/calibre/ebooks/oeb/reader.py", line 72, in __call__
    self._all_from_opf(opf)
  File "/usr/lib/calibre/calibre/ebooks/oeb/reader.py", line 593, in _all_from_opf
    self._manifest_from_opf(opf)
  File "/usr/lib/calibre/calibre/ebooks/oeb/reader.py", line 243, in _manifest_from_opf
    self._manifest_add_missing(invalid)
  File "/usr/lib/calibre/calibre/ebooks/oeb/reader.py", line 187, in _manifest_add_missing
    for url in cssutils.getUrls(item.data):
  File "/usr/lib/python2.6/dist-packages/cssutils/__init__.py", line 246, in getUrls
    u = getUrl(item)
  File "/usr/lib/python2.6/dist-packages/cssutils/__init__.py", line 229, in getUrl
    v.CSS_URI == v.primitiveType:
  File "/usr/lib/python2.6/dist-packages/cssutils/css/cssvalue.py", line 554, in _getPrimitiveType
    self.__set_primitiveType()
  File "/usr/lib/python2.6/dist-packages/cssutils/css/cssvalue.py", line 544, in __set_primitiveType
    val, type_ = self._value
AttributeError: 'CSSPrimitiveValue' object has no attribute '_value'
petdr is offline   Reply With Quote
Old 01-22-2011, 02:25 AM   #2
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: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
you're probably using cssutils 0.9.8x its incompatible. uninstall your distro provided calibre package and install the calibre binary from calibre-ebook.com
kovidgoyal is offline   Reply With Quote
Advert
Reply

Tags
recipe the_age exception


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Recipe works when mocked up as Python file, fails when converted to Recipe ode Recipes 7 09-04-2011 04:57 AM
Fetch News Exception oggie41 Calibre 1 09-22-2010 09:02 AM
Exception error surendraps Introduce Yourself 8 09-10-2010 04:41 PM
An unexpected exception has occured johnwhelan Bookeen 2 01-23-2009 07:25 AM
Time recipe - unhandled exception scwehrl Calibre 2 01-04-2009 11:17 AM


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


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