I haven't created any tests, as I wasn't quite sure how best to go
about it.  Just create SQLObject data and assert that it's there?  I
don't think the problem is with Catwalk, I think it's something that
I'm doing wrong (I've run into several problems where I was stumped,
only to find that I needed to put in a default value).  I'm just stuck
on what to look for.  Because I haven't told tg about any
building_floor-table, where is it coming from?  If it's being created
automatically, wouldn't it then be populated automatically?

I've dropped and re-created the SQL, and everything shows up fine in
catwalk until I start putting values in.  That's when it gets screwy
and doesn't show up any more, giving the <whateverI'mLinking)ID
traceback error.

On Aug 30, 4:50 am, "Diez B. Roggisch" <[EMAIL PROTECTED]>
wrote:
> Irish schrieb:
>
>
>
> > Thanks for replying.  Trying to view "Floor" when it's populated
> > produces the following traceback:
> > Traceback (most recent call last):
> >   File "/usr/lib/python2.5/site-packages/CherryPy-2.2.1-py2.5.egg/
> > cherrypy/_cphttptools.py", line 105, in _run
> >     self.main()
> >   File "/usr/lib/python2.5/site-packages/CherryPy-2.2.1-py2.5.egg/
> > cherrypy/_cphttptools.py", line 254, in main
> >     body = page_handler(*virtual_path, **self.params)
> >   File "<string>", line 3, in index
> >   File "/usr/lib/python2.5/site-packages/TurboGears-1.0.3.2-py2.5.egg/
> > 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-1.0.3.2-py2.5.egg/
> > turbogears/database.py", line 312, in so_rwt
> >     retval = func(*args, **kw)
> >   File "<string>", line 5, in _expose
> >   File "/usr/lib/python2.5/site-packages/TurboGears-1.0.3.2-py2.5.egg/
> > turbogears/controllers.py", line 359, in <lambda>
> >     mapping, fragment, args, kw)))
> >   File "/usr/lib/python2.5/site-packages/TurboGears-1.0.3.2-py2.5.egg/
> > turbogears/controllers.py", line 386, in _execute_func
> >     output = errorhandling.try_call(func, *args, **kw)
> >   File "/usr/lib/python2.5/site-packages/TurboGears-1.0.3.2-py2.5.egg/
> > turbogears/errorhandling.py", line 72, in try_call
> >     return func(self, *args, **kw)
> >   File "/usr/lib/python2.5/site-packages/TurboGears-1.0.3.2-py2.5.egg/
> > turbogears/toolbox/catwalk/browse.py", line 24, in index
> >     total,rows =
> > self.rows_for_model(object_name,start,page_size,filters)
> >   File "/usr/lib/python2.5/site-packages/TurboGears-1.0.3.2-py2.5.egg/
> > turbogears/toolbox/catwalk/browse.py", line 124, in rows_for_model
> >     relations = self.relation_values(object_name,rows)
> >   File "/usr/lib/python2.5/site-packages/TurboGears-1.0.3.2-py2.5.egg/
> > turbogears/toolbox/catwalk/browse.py", line 173, in relation_values
> >     joins[column.joinMethodName] = conn.queryAll(query)
> >   File "/usr/lib/python2.5/site-packages/SQLObject-0.9.1-py2.5.egg/
> > sqlobject/dbconnection.py", line 840, in queryAll
> >     return self._dbConnection._queryAll(self._connection, s)
> >   File "/usr/lib/python2.5/site-packages/SQLObject-0.9.1-py2.5.egg/
> > sqlobject/dbconnection.py", line 348, in _queryAll
> >     self._executeRetry(conn, c, s)
> >   File "/usr/lib/python2.5/site-packages/SQLObject-0.9.1-py2.5.egg/
> > sqlobject/sqlite/sqliteconnection.py", line 183, in _executeRetry
> >     raise OperationalError(ErrorMessage(e))
> > OperationalError: no such table: building_floor
>
> > It looks like I'm missing defaults, or something isn't linking as I
> > intended it to.
>
> To me it seems you didn't (re)create the schema properly, so you lack
> the building_floor-table that links buildings to floors. However, I'm a
> bit stumped that it's there - it shouldn't be necessary.
>
> Can you dump the SQL created, and can you create a new DB + some tests
> showing that things work in your model as expected? Until then, I'd
> rather not blame catwalk.
>
> Diez


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to