I get an error like that when I try to create an model object without specifying all the required fields.
Make sure that your model object has defaults for every value that you are not specifying. On Feb 21, 3:59 pm, jeff <[EMAIL PROTECTED]> wrote: > I am getting the following error: > -------------------------------------------------------------------------------------- > Page handler: <bound method Root.addlisting2 of > <WheelsMall.controllers.Root object at 0xaI 88562c>> > Traceback (most recent call last): > File "/usr/lib/python2.5/site-packages/cherrypy/_cphttptools.py", > line 121, in _run > self.main() > File "/usr/lib/python2.5/site-packages/cherrypy/_cphttptools.py", > line 264, in main > body = page_handler(*virtual_path, **self.params) > File "<string>", line 3, in addlisting2 > File "/usr/lib/python2.5/site-packages/turbogears/controllers.py", > line 344, in expose > *args, **kw) > File "<string>", line 5, in run_with_transaction > File "/usr/lib/python2.5/site-packages/turbogears/database.py", line > 356, in so_rwt > retval = func(*args, **kw) > File "<string>", line 5, in _expose > File "/usr/lib/python2.5/site-packages/turbogears/controllers.py", > line 359, in <lambda> > mapping, fragment, args, kw))) > File "/usr/lib/python2.5/site-packages/turbogears/controllers.py", > line 386, in _execute_func > output = errorhandling.try_call(func, *args, **kw) > File "/usr/lib/python2.5/site-packages/turbogears/errorhandling.py", > line 72, in try_call > return func(self, *args, **kw) > File "<string>", line 3, in addlisting2 > File "/usr/lib/python2.5/site-packages/turbogears/identity/ > conditions.py", line 242, in require > return fn(self, *args, **kwargs) > File "/home/jeff/TG/wm/WheelsMall/controllers.py", line 255, in > addlisting2 > status = model.statuses['Pending'] > File "/usr/lib/python2.5/site-packages/sqlobject/declarative.py", > line 98, in _wrapper > return fn(self, *args, **kwargs) > File "/usr/lib/python2.5/site-packages/sqlobject/main.py", line > 1210, in __init__ > self._create(id, **kw) > File "/usr/lib/python2.5/site-packages/sqlobject/main.py", line > 1241, in _create > self._SO_finishCreate(id) > File "/usr/lib/python2.5/site-packages/sqlobject/main.py", line > 1265, in _SO_finishCreate > id, names, values) > File "/usr/lib/python2.5/site-packages/sqlobject/dbconnection.py", > line 396, in queryInsertID > return self._runWithConnection(self._queryInsertID, soInstance, > id, names, values) > File "/usr/lib/python2.5/site-packages/sqlobject/dbconnection.py", > line 255, in _runWithConnection > val = meth(conn, *args) > File "/usr/lib/python2.5/site-packages/sqlobject/mysql/ > mysqlconnection.py", line 156, in _queryInsertID > q = self._insertSQL(table, names, values) > File "/usr/lib/python2.5/site-packages/sqlobject/dbconnection.py", > line 390, in _insertSQL > ', '.join([self.sqlrepr(v) for v in values]))) > File "/usr/lib/python2.5/site-packages/sqlobject/dbconnection.py", > line 745, in sqlrepr > return sqlrepr(v, self.dbName) > File "/usr/lib/python2.5/site-packages/sqlobject/converters.py", > line 236, in sqlrepr > (type(obj), repr(obj)) > ValueError: Unknown SQL builtin type: <type 'classobj'> for <class > sqlobject.sqlbuilder.NoDefault at 0xa26fddc> > -------------------------------------------------------------------------------------- > This seems to happening on the line: > newlist = model.listing( > user = identity.current.user, > category = category, > year = year, > make = make, > model = listing_model, > price = price, > owned = model.owneds[owned], > longdesc = desc, > status = model.statuses['Pending'] > ) > does anyone know what this error means, and/or how to fix it, also if > needed I will post more of the code --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

