View Single Post
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: 74,284
Karma: 317184274
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
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