Unknown column error with FastData

1 view
Skip to first unread message

Ben Sizer

unread,
Jul 13, 2008, 8:21:43 AM7/13/08
to TurboGears
I installed the latest version of FastData and applied it to a few of
my model classes. The display seems to work ok, but when I click to
edit a row, I get an error like this:

<...snip...>
File "e:\code\python25\lib\site-packages\TGFastData-0.9a7-py2.5.egg
\tgfastdata\datacontroller.py", line 314, in edit
values.update(join_items(obj))
File "e:\code\python25\lib\site-packages\TGFastData-0.9a7-py2.5.egg
\tgfastdata\datacontroller.py", line 21, in join_items
d[attr_name] = list(getattr(sobj, attr_name))
File "<string>", line 1, in <lambda>
File "e:\code\python25\lib\site-packages\SQLObject-0.10.0-py2.5.egg
\sqlobject\joins.py", line 144, in performJoin
inst.id)
File "e:\code\python25\lib\site-packages\SQLObject-0.10.0-py2.5.egg
\sqlobject\dbconnection.py", line 537, in _SO_selectJoin
self.sqlrepr(value)))
File "e:\code\python25\lib\site-packages\SQLObject-0.10.0-py2.5.egg
\sqlobject\dbconnection.py", line 686, in queryAll
return self._dbConnection._queryAll(self._connection, s)
File "e:\code\python25\lib\site-packages\SQLObject-0.10.0-py2.5.egg
\sqlobject\dbconnection.py", line 343, in _queryAll
self._executeRetry(conn, c, s)
File "e:\code\python25\lib\site-packages\SQLObject-0.10.0-py2.5.egg
\sqlobject\mysql\mysqlconnection.py", line 119, in _executeRetry
raise OperationalError(ErrorMessage(e))
OperationalError: Unknown column 'task_type_id' in 'where clause'


The model class looks like this:
class TaskType(SQLObject):
description = UnicodeCol(length=30, notNone=True)
# ...more, presumably irrelevant properties elided...
instances = MultipleJoin('Task') # all existing tasks of this type

The table in the MySQL database looks like:

CREATE TABLE `task_type` (
`id` int(11) NOT NULL auto_increment,
`description` varchar(30) NOT NULL,
/* --- etc -- */
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8


Anybody got any ideas what I could be doing wrong?

Running TG 1.0.4.4, TGFastData 0.9.a7, SQLObject 0.10.0, on Python 2.5/
Win32/MySQL platform.

--
Ben Sizer

Mark Ramm

unread,
Jul 21, 2008, 10:37:01 AM7/21/08
to turbo...@googlegroups.com
FastData was left without a maintainer, and marked as somewhat of a
dead-end somewhere in 2006, before 1.0.x, I remember because I removed
all references to it from the TurboGears book.

I'm not necessarily the person to help, but it looks like there's some
incompatability with the latest sqlobject. You could try pegging
your project to an earlier version of SO. And if you or someone
else is willing to help maintain fasdata I am sure that we would be
willing to do what we can to can help you get started and get
fast-data working with the latest version of SQLObject.

--Mark Ramm

--
Mark Ramm-Christensen
email: mark at compoundthinking dot com
blog: www.compoundthinking.com/blog

Ben Sizer

unread,
Jul 22, 2008, 5:01:27 AM7/22/08
to TurboGears
On Jul 21, 3:37 pm, "Mark Ramm" <mark.mchristen...@gmail.com> wrote:
> FastData was left without a maintainer, and marked as somewhat of a
> dead-end somewhere in 2006, before 1.0.x, I remember because I removed
> all references to it from the TurboGears book.

Ok, thanks. Perhaps someone could remove all references to it from the
official Wiki docs too, then? (http://docs.turbogears.org/FastData)

> I'm not necessarily the person to help, but it looks like there's some
> incompatability with the latest sqlobject.   You could try pegging
> your project to  an earlier version of SO.

To be honest I don't have much investment in FastData; it just seemed
to be a wheel that I didn't need to reinvent. Is there anything
similar for TG 1.0 (and SQLObject)?

--
Ben Sizer

Matt Wilson

unread,
Jul 22, 2008, 6:17:06 PM7/22/08
to TurboGears
On Jul 22, 5:01 am, Ben Sizer <kylo...@gmail.com> wrote:
> On Jul 21, 3:37 pm, "Mark Ramm" <mark.mchristen...@gmail.com> wrote:
>
> > FastData was left without a maintainer, and marked as somewhat of a
> > dead-end somewhere in 2006, before 1.0.x, I remember because I removed
> > all references to it from the TurboGears book.
>
> Ok, thanks. Perhaps someone could remove all references to it from the
> official Wiki docs too, then? (http://docs.turbogears.org/FastData)

I think it's OK to mention it, but its alpha status is worth calling
out more explicitly.

MichaelG

unread,
Aug 20, 2008, 6:57:50 PM8/20/08
to TurboGears

I am having some similar challenges to Ben, i.e, my otherwise running
TG 1.x / SQLObject application has some calls to FastData which used
to work, but work no longer (my specific error is "TypeError:
iteration over non-sequence" but I guess it likely it boils down to
the FastData code base is not maintained anymore.).


> Is there anything
> similar for TG 1.0 (and SQLObject)?
>
> --
> Ben Sizer


Is there another tool for which and dirty record views/edit that could
take the place of FastData, if I want to fix those portions of the
application that are not working just now? Open to any and all ideas.

Cheers,

- Michael
Reply all
Reply to author
Forward
0 new messages