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 |
From: Scott R. <sc...@to...> - 2004-04-07 18:55:10
|
Person.new(firstName="Jose", lastName="Galvez") You were missing the .new ... On Wed, 2004-04-07 at 14:50, Andrew S. Garbutt wrote: > 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 > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > sqlobject-discuss mailing list > sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss |
From: Ian B. <ia...@co...> - 2004-04-07 19:21:44
|
Andrew S. Garbutt wrote: > 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. Whoops, sorry, the mostly live tarball isn't very live at all anymore. Where did you see the reference to it? (so I can remove it) You should use a subversion checkout, which is truly live: svn co svn://colorstudy.com/trun/SQLObject (None of the half-day-old anon SourceForge CVS stuff anymore) Ian |
From: Andrew S. G. <asg...@uc...> - 2004-04-07 19:39:59
|
The reference to the "Mostly Live CVS Tarball" is here -> http://sqlobject.org/#download' Thanks for all of the help.. I check out the sources through the subversion repository, -Andy Ian Bicking wrote: > Andrew S. Garbutt wrote: > >> 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. > > > Whoops, sorry, the mostly live tarball isn't very live at all anymore. > Where did you see the reference to it? (so I can remove it) > > You should use a subversion checkout, which is truly live: > > svn co svn://colorstudy.com/trun/SQLObject > > (None of the half-day-old anon SourceForge CVS stuff anymore) > > Ian > |