Confused newbie needs help with "__init__() takes exactly 11 arguments (1 given)"

2005-08-18 Thread googleboy
I've written a little script to parse a csv file then use seach/replace over a template to create a file for each line in the file. It pikes out when I call the function that parses the csv (read_revs). If I have inadvertantly left an extra comma or two in the comma field, it gives an error that

Confused newbie needs help with "__init__() takes exactly 11 arguments (1 given)"

2005-08-18 Thread googleboy
Mostly I posted to try to find out more about the arguments being passed to __init__, and why they'd be 13 one second and 1 the next. I also was hoping to get a little more background on what is happening under the hood of the csv function I've plagiarised. I haev read the online python doco on

Re: Confused newbie needs help with "__init__() takes exactly 11 arguments (1 given)"

2005-08-18 Thread [EMAIL PROTECTED]
That's great, but it seems like a lot of work just to read in everything. Take a look at the sample that I did with the interpreter... First, X is a simulated input line... --- x = " param1,param2,param3,param4,param5,param6,param7,param8,param9,comments blah , blah, test" --- Ok, so just like you

Re: Confused newbie needs help with "__init__() takes exactly 11 arguments (1 given)"

2005-08-18 Thread John Machin
googleboy wrote: > I've written a little script to parse a csv file then use seach/replace > over a template to create a file for each line in the file. It pikes > out when I call the function that parses the csv (read_revs). If I > have inadvertantly left an extra comma or two in the comma field

Re: Confused newbie needs help with "__init__() takes exactly 11 arguments (1 given)"

2005-08-19 Thread [EMAIL PROTECTED]
it looks like your problem is in this line: reviews = [Review(*[field.strip() for field in row]) for row in reader] ouch! split that up a bit so we can understand what the heck you are trying to do here. Also, it appears the whole thing is in these [ ] ? why? -- http://mail.python.org/mailman/li

Re: Confused newbie needs help with "__init__() takes exactly 11 arguments (1 given)"

2005-08-19 Thread [EMAIL PROTECTED]
d'oh I'm an idiot... you are making a 'list' object. -- http://mail.python.org/mailman/listinfo/python-list