View Single Post
Old 03-24-2009, 11:35 AM   #384
ligos
Junior Member
ligos began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Nov 2007
Device: sony reader
I have been using Calibre for some time and made some of my own recipes. Over a long period I have been using Calibre 0.4.67. and those recipes were working on this Calibre version. I have tried few next Calibre versions but those custom recipes were not working on those trials.

Now I have 0.5.2. Calibre version installed and those recipes do not work either. The following Conversion Error shows up:
Quote:
Job: **Fetch news from DiePresseWirtschaft**
**tuple**: ('AttributeError', u"'DiePresseWirtschaft' object has no attribute 'output_dir'")
**Traceback**:
Traceback (most recent call last):
File "parallel.py", line 958, in worker
File "parallel.py", line 916, in work
File "C:\Program Files\calibre\library.zip\calibre\ebooks\lrf\feeds \convert_from.py", line 40, in main
File "C:\Program Files\calibre\library.zip\calibre\web\feeds\main.p y", line 150, in run_recipe
AttributeError: 'DiePresseWirtschaft' object has no attribute 'output_dir'

**Log**:
('AttributeError', u"'DiePresseWirtschaft' object has no attribute 'output_dir'")
Traceback (most recent call last):
File "parallel.py", line 958, in worker
File "parallel.py", line 916, in work
File "C:\Program Files\calibre\library.zip\calibre\ebooks\lrf\feeds \convert_from.py", line 40, in main
File "C:\Program Files\calibre\library.zip\calibre\web\feeds\main.p y", line 150, in run_recipe
AttributeError: 'DiePresseWirtschaft' object has no attribute 'output_dir'
The error is the same in every recipe except for the name of the recipe (in the example above DiePresseWirtschaft).
The code of each recipe is a little bit different and it generally presents itself in this fashion:
Code:
from libprs500.ebooks.lrf.web.profiles import DefaultProfile 

import re 

class DiePresseWirtschaft(DefaultProfile): 
    title = 'DiePresseWirtschaft' 
    timefmt = ' [%d %b %Y]' 
    summary_length = 1000
    oldest_article = 1
    max_articles_per_feed = 100
    max_recursions = 2 
    html_description = True 
    no_stylesheets = True 

    def get_feeds(self):  
        return [ ('Die Presse Wirtschaft', 'http://www.diepresse.com/rss/Wirtschaft') ]  

    def print_version(self,url): 
        return url.replace('index.do?from=rss', 'print.do') 

    preprocess_regexps = [
        (re.compile(r'<script>.*?</script>', re.IGNORECASE | re.DOTALL), lambda match : ''),
        (re.compile(r'<H4>.*?</H4>', re.IGNORECASE | re.DOTALL), lambda match : ''),
        ]
Does anyone know what to do to to start my recipes working again?
ligos is offline