[Tutor] MySQLdb error - PLEASE SAVE ME

Python python at venix.com
Sun Sep 18 00:53:41 CEST 2005

> I dont see why your new code shouldn't work, it makes sense to me ...

Danny nailed this one.  He warned that your data could be short commas.
You have lines with fewer than two commas.  The INSERT is failing with:
	not enough arguments

Simple fix is to skip insert if len(links) != 3.

Note that we can't test without your data.  Generally, it is better to
keep the responsibility for testing in your hands and simply provide the
error info and the background context.

(Didn't mean to panic about the password, BUT I know folks who've
learned the hard way that Google sees a lot more than you might expect,
and pranksters really will drop your tables.)

Lloyd Kvam
Venix Corp

More information about the Tutor mailing list