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-18-2011, 03:45 PM   #1
bcollier
Member
bcollier began at the beginning.
 
bcollier's Avatar
 
Posts: 22
Karma: 10
Join Date: Jan 2011
Device: Kindle DX
<method> takes exactly 1 argument (2 given) python question

I've gotten this same error, seemingly for no reason, and Googling around doesn't seem to help. Maybe someone else here has come across it. I'm calling it with 1 argument, and it has 1 argument. I know I've had this problem other places to. Any thoughts?

Type:Error: parse_bits_blog() takes exactly 1 argument (2 given)

if self.include_bits_blog:
self.parse_bits_blog(self)

def parse_bits_blog(self):
bits_soup = self.index_to_soup('http://bits.blogs.nytimes.com/2011/01/13/')
self.log(str(bits_soup))
bcollier is offline   Reply With Quote
Old 01-18-2011, 03:49 PM   #2
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 71,510
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
Quote:
Originally Posted by bcollier View Post
I've gotten this same error, seemingly for no reason, and Googling around doesn't seem to help. Maybe someone else here has come across it. I'm calling it with 1 argument, and it has 1 argument. I know I've had this problem other places to. Any thoughts?

Type:Error: parse_bits_blog() takes exactly 1 argument (2 given)

if self.include_bits_blog:
self.parse_bits_blog(self)

def parse_bits_blog(self):
bits_soup = self.index_to_soup('http://bits.blogs.nytimes.com/2011/01/13/')
self.log(str(bits_soup))
As far as I understand it, the self parameter is implied. You should not have it in the call. i.e. your code should be

Code:
if self.include_bits_blog:
            self.parse_bits_blog()

def parse_bits_blog(self):
        bits_soup = self.index_to_soup('http://bits.blogs.nytimes.com/2011/01/13/')
        self.log(str(bits_soup))[/QUOTE]
pdurrant is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
IOError: [Errno 22] Invalid argument jkcoder Calibre 5 09-25-2010 09:28 AM
for the sake of argument... Opus Amazon Kindle 9 06-21-2010 10:55 PM
Python/Calibre question horsegoalie Calibre 0 12-15-2009 08:25 PM
8 Ways To Handle An Argument moon light Lounge 11 08-26-2009 09:16 PM
An argument we are having at work... ficbot News 125 08-05-2009 08:09 AM


All times are GMT -4. The time now is 05:07 PM.


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