Hello, The same error happens with version 0.6.0 as well as 0.5.8. Although for 0.5.8, the error message is different (see below). Note also that the version of the Mysql python driver is 1.2.3. Thanks!!!
QLAlchemy-0.5.8-py2.6.egg/sqlalchemy/databases/mysql.pyc in reflect(self, connection, table, show_create, charset, only) 2133 2134 if only: -> 2135 only = set(only) 2136 2137 for line in re.split(r'\r?\n', show_create): TypeError: 'bool' object is not iterable Cheers, Paul On Tue, Feb 8, 2011 at 1:36 PM, Paul Rigor <paulri...@gmail.com> wrote: > Hello, > > I have a table with the following schema: > > +-------------+---------------+------+-----+---------+----------------+ > | Field | Type | Null | Key | Default | Extra | > +-------------+---------------+------+-----+---------+----------------+ > | acc | varchar(1024) | YES | | NULL | | > | is_obsolete | int(11) | YES | | NULL | | > | is_root | int(11) | YES | | NULL | | > | term_type | varchar(1024) | YES | | NULL | | > | id | int(11) | YES | | NULL | | > | cid | int(11) | NO | PRI | NULL | auto_increment | > | name | varchar(1024) | YES | | NULL | | > +-------------+---------------+------+-----+---------+----------------+ > > > When attempting to run the following code to obtain column information > programmatically... > > from sqlalchemy import create_engine, MetaData, Table > from sqlalchemy.engine import reflection > dburi = "mysql://..." > engine = create_engine(dburi) > meta = MetaData(dburi) > user_table = Table('term', meta,useexisting=True) > engine.reflecttable(user_table,include_columns=True) # More verbose error > trace > insp = reflection.Inspector.from_engine(engine) > insp.reflecttable(user_table, include_columns=True) > > > I get the following problem: > python2.6/site-packages/SQLAlchemy-0.6.6-py2.6.egg/sqlalchemy/engine/reflection.pyc > in reflecttable(self, table, include_columns) > 383 found_table = True > 384 name = col_d['name'] > --> 385 if include_columns and name not in include_columns: > 386 continue > 387 > > TypeError: argument of type 'bool' is not iterable > > Is there a better way of obtaining table schemas? > > Thanks, > Paul > -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.