> select_columns = [table.c.col1, table.c.col2]
>
>     statement = table.select(select_columns)

You probably want to:

select_columns = [table.c.col1, table.c.col2]
statement = sqlalchemy.select(select_columns)
res = statement.execute().fetchall() # or the like...

The "table.select" form you try to get working is used to specify eg. where 
clauses, not to specify which columns to get.


-- 
Sébastien LELONG
sebastien.lelong[at]sirloon.net

On Tuesday 20 February 2007 16:10, vinjvinj wrote:
> I'm getting the following error when I build the select clause.
>
> select_columns = [table.c.col1, table.c.col2]
>
>     statement = table.select(select_columns)
>   File "build\bdist.win32\egg\sqlalchemy\sql.py", line 1351, in select
>   File "build\bdist.win32\egg\sqlalchemy\sql.py", line 65, in select
>   File "build\bdist.win32\egg\sqlalchemy\sql.py", line 1503, in
> __init__
>   File "build\bdist.win32\egg\sqlalchemy\sql.py", line 1575, in
> append_whereclause
>   File "build\bdist.win32\egg\sqlalchemy\sql.py", line 1581, in
> _append_condition
> AttributeError: 'list' object has no attribute 'accept_visitor'
>
> Any idea what this means?
>
> VJ
>
>
> 

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" 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/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to