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

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

Notices

Reply
 
Thread Tools Search this Thread
Old 01-28-2013, 10:42 AM   #1
TechnoCat
Zealot
TechnoCat gives new meaning to the word 'superlative.'TechnoCat gives new meaning to the word 'superlative.'TechnoCat gives new meaning to the word 'superlative.'TechnoCat gives new meaning to the word 'superlative.'TechnoCat gives new meaning to the word 'superlative.'TechnoCat gives new meaning to the word 'superlative.'TechnoCat gives new meaning to the word 'superlative.'TechnoCat gives new meaning to the word 'superlative.'TechnoCat gives new meaning to the word 'superlative.'TechnoCat gives new meaning to the word 'superlative.'TechnoCat gives new meaning to the word 'superlative.'
 
Posts: 117
Karma: 150390
Join Date: Nov 2011
Location: Pacific NorthWest
Device: Kindle Fire
Exclamation Calibre update breaks Calibre API

Several of my recipes broke with the latest Calibre update. They broke on BasicNewsRecipe.get_browser().

The error is:

File "<string>", line 131, in get_browser
TypeError: unbound method get_browser() must be called with BasicNewsRecipe instance as first argument (got nothing instead)

But if you look at the get_browser() example at http://manual.calibre-ebook.com/news_recipe.html, this is correct.

I could update the recipes, but it would make more sense to un-break Calibre.
TechnoCat is offline   Reply With Quote
Old 01-28-2013, 11:11 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: 25,430
Karma: 4961459
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You need to change your recipes to use

br = BasicNewsRecipe.get_browser(self)
kovidgoyal is online now   Reply With Quote
Old 01-28-2013, 04:12 PM   #3
TechnoCat
Zealot
TechnoCat gives new meaning to the word 'superlative.'TechnoCat gives new meaning to the word 'superlative.'TechnoCat gives new meaning to the word 'superlative.'TechnoCat gives new meaning to the word 'superlative.'TechnoCat gives new meaning to the word 'superlative.'TechnoCat gives new meaning to the word 'superlative.'TechnoCat gives new meaning to the word 'superlative.'TechnoCat gives new meaning to the word 'superlative.'TechnoCat gives new meaning to the word 'superlative.'TechnoCat gives new meaning to the word 'superlative.'TechnoCat gives new meaning to the word 'superlative.'
 
Posts: 117
Karma: 150390
Join Date: Nov 2011
Location: Pacific NorthWest
Device: Kindle Fire
Kovid, I usually agree with you, but this is silly. Your own documentation is still wrong online. Why force the recipes to change? Just undo the destructive change.
TechnoCat is offline   Reply With Quote
Old 01-28-2013, 10:26 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: 25,430
Karma: 4961459
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Obviously, because the "destructive" change is there for a reason.
kovidgoyal is online now   Reply With Quote
Old 01-28-2013, 11:23 PM   #5
TechnoCat
Zealot
TechnoCat gives new meaning to the word 'superlative.'TechnoCat gives new meaning to the word 'superlative.'TechnoCat gives new meaning to the word 'superlative.'TechnoCat gives new meaning to the word 'superlative.'TechnoCat gives new meaning to the word 'superlative.'TechnoCat gives new meaning to the word 'superlative.'TechnoCat gives new meaning to the word 'superlative.'TechnoCat gives new meaning to the word 'superlative.'TechnoCat gives new meaning to the word 'superlative.'TechnoCat gives new meaning to the word 'superlative.'TechnoCat gives new meaning to the word 'superlative.'
 
Posts: 117
Karma: 150390
Join Date: Nov 2011
Location: Pacific NorthWest
Device: Kindle Fire
Okay, what is the reason that justified this? It seems like there should have been less destructive ways to get to most goals.
TechnoCat is offline   Reply With Quote
Old 01-28-2013, 11:25 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: 25,430
Karma: 4961459
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Read the commit log, you will see the reason.
kovidgoyal is online now   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
Calibre breaks image/div margins dasboeh ePub 9 12-21-2012 01:15 PM
calibre Content Server Interfacing API alexyeo Development 2 10-31-2011 11:18 PM
calibre's new plugin API kovidgoyal Plugins 26 05-07-2011 02:43 PM
Adding page breaks in Calibre breaks ePubcheck validation bookraft Conversion 16 03-01-2011 01:23 PM
calibre now uses the Google Books API to get metadata kovidgoyal Calibre 9 03-23-2009 09:36 PM


All times are GMT -4. The time now is 10:23 PM.


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