[SQLObject] Object/row instantiation question
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Mark M. <mar...@me...> - 2011-03-08 19:26:30
|
Hi All, I'm a new SQLObject user ... I have this table: CREATE TABLE zipcode ( zip integer PRIMARY KEY, city text, -- and so forth ... with Python representing it: class zipcode(SQLObject): class sqlmeta: fromDatabase = True idName = 'zip' But when I try to create rows with: for myzip in range(1,99999): z = zipcode(zip = myzip, city = 'zipcity' + str(myzip)) I get an error File "/usr/local/lib/python2.4/site-packages/SQLObject-1.1dev_r4347-py2.4.egg\ /sqlobject/main.py", line 1099, in set raise TypeError, "%s.set() got an unexpected keyword argument %s" % (self._\ _class__.__name__, name) TypeError: zipcode.set() got an unexpected keyword argument zip What am I missing? -- Mark McWiggins Principal Solutions Engineer mar...@me... 443-656-3311 ext 344 |