View Single Post
Old 10-06-2012, 06:20 AM   #1
Junior Member
penguin began at the beginning.
Posts: 3
Karma: 10
Join Date: Oct 2012
Device: Kindle Touch
Der Spiegel, Recipe Error Code:1


I'm using the "Der Spiegel" recipe the last weeks without problems. But now I got the following error:

InputFormatPlugin: Recipe Input running
Using custom recipe
Found section  Hausmitteilung
Found article  
Python function terminated unexpectedly
  'href' (Error Code: 1)
Traceback (most recent call last):
  File "", line 132, in main
  File "", line 109, in run_entry_point
  File "site-packages\calibre\utils\ipc\", line 186, in main
  File "site-packages\calibre\gui2\convert\", line 25, in gui_convert
  File "site-packages\calibre\ebooks\conversion\", line 989, in run
  File "site-packages\calibre\customize\", line 239, in __call__
  File "site-packages\calibre\ebooks\conversion\plugins\", line 109, in convert
  File "site-packages\calibre\web\feeds\", line 881, in download
  File "site-packages\calibre\web\feeds\", line 1026, in build_index
  File "<string>", line 81, in parse_index
  File "site-packages\calibre\ebooks\", line 518, in __getitem__
KeyError: 'href'

I only customize the recipe to add the date to the title (works fine the last weeks), but now also the original recipe stops with the same error.
I already do some google research and try to change the recipe, but without success. I'm not a pro so its maybe just a simple change.
The problem seems to be the highlighted part:

feeds = []
         for section in index.findAll('dt'):
            section_title = self.tag_to_string(section).strip()
            self.log('Found section ', section_title)

            articles = []
            for article in section.findNextSiblings(['dd','dt']):
                if == 'dt':
                link = article.find('a')
                title = self.tag_to_string(link).strip()
                if title in self.empty_articles:
                self.log('Found article ', title)
                url = self.PREFIX + link['href']
                articles.append({'title' : title, 'date' : strftime(self.timefmt), 'url' : url})
        return feeds;

If i set the URL manually to a single article the recipe download / convert this article without any errors.

I hope anyone have an idea to get the recipe work again! (Btw I update to calibre 0.9.1 but no changes)

Thx Matthias

Last edited by penguin; 10-07-2012 at 07:06 PM.
penguin is offline   Reply With Quote