From: Andrew S. G. <asg...@uc...> - 2004-04-07 18:50:56
|
I am just starting out with SQLObject. It looks like a really nice package that i can use to map some complex relations. However, in starting out i ran into some trouble. The code that I used follows this message, and matches the provided code in the documentation.. The error occurs when i try p = Person(firstName="Jose", lastName="Galvez"). I am using Python 2.3.3 on windows with SQLObject's Mostly Live CVS Tarball. Any help would be greatly appreciated. -Andy [TRACEBACK] raceback (most recent call last): File "<interactive input>", line 1, in ? TypeError: __new__() got an unexpected keyword argument 'lastName' [CODE] from SQLObject import * __connection__ = MySQLConnection(host='169.237.122.232', db='pydo', user='root', passwd='jerrymouse' ) class Person(SQLObject): firstName = StringCol() middleInitial = StringCol(length=1, default=None) lastName = StringCol() Person.createTable() p = Person(firstName="Jose", lastName="Galvez") print p |