Here is the create statement of the table causing problem:

--

CREATE TABLE `AdminClass` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `active` tinyint(1) unsigned DEFAULT NULL,
  `en_US` varchar(256) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

--

Using sqlalchemy version 0.5.8 I don't get this error.

Thanks,
Mathieu

On Mar 10, 6:40 pm, "Michael Bayer" <mike...@zzzcomputing.com> wrote:
> MattQc wrote:
> > Hi there,
> > Using sqlalchemy version 0.6beta1, I am trying to load a mysql table
> > which has a field unsigned int.
> > Here is the error I got:
>
> we would have to see your schema since we have working test coverage for
> reflection of INTEGER with unsigned.
>
>
>
> >   File "/usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.6beta1-
> > py2.6.egg/sqlalchemy/schema.py", line 205, in __new__
> >     table._init(name, metadata, *args, **kw)
> >   File "/usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.6beta1-
> > py2.6.egg/sqlalchemy/schema.py", line 258, in _init
> >     reflecttable(self, include_columns=include_columns)
> >   File "/usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.6beta1-
> > py2.6.egg/sqlalchemy/engine/base.py", line 1512, in reflecttable
> >     self.dialect.reflecttable(conn, table, include_columns)
> >   File "/usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.6beta1-
> > py2.6.egg/sqlalchemy/engine/default.py", line 160, in reflecttable
> >     return insp.reflecttable(table, include_columns)
> >   File "/usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.6beta1-
> > py2.6.egg/sqlalchemy/engine/reflection.py", line 263, in reflecttable
> >     tbl_opts = self.get_table_options(table_name, schema,
> > **table.kwargs)
> >   File "/usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.6beta1-
> > py2.6.egg/sqlalchemy/engine/reflection.py", line 126, in
> > get_table_options
> >     **kw)
> >   File "<string>", line 1, in <lambda>
> >   File "/usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.6beta1-
> > py2.6.egg/sqlalchemy/engine/reflection.py", line 40, in cache
> >     ret = fn(self, con, *args, **kw)
> >   File "/usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.6beta1-
> > py2.6.egg/sqlalchemy/dialects/mysql/base.py", line 1769, in
> > get_table_options
> >     parsed_state = self._parsed_state_or_create(connection,
> > table_name, schema, **kw)
> >   File "/usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.6beta1-
> > py2.6.egg/sqlalchemy/dialects/mysql/base.py", line 1868, in
> > _parsed_state_or_create
> >     info_cache=kw.get('info_cache', None)
> >   File "<string>", line 1, in <lambda>
> >   File "/usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.6beta1-
> > py2.6.egg/sqlalchemy/engine/reflection.py", line 40, in cache
> >     ret = fn(self, con, *args, **kw)
> >   File "/usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.6beta1-
> > py2.6.egg/sqlalchemy/dialects/mysql/base.py", line 1899, in
> > _setup_parser
> >     return parser.parse(sql, charset)
> >   File "/usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.6beta1-
> > py2.6.egg/sqlalchemy/dialects/mysql/base.py", line 2044, in parse
> >     self._parse_column(line, state)
> >   File "/usr/local/lib/python2.6/dist-packages/SQLAlchemy-0.6beta1-
> > py2.6.egg/sqlalchemy/dialects/mysql/base.py", line 2209, in
> > _parse_column
> >     type_instance = col_type(*type_args, **type_kw)
> > TypeError: __init__() got an unexpected keyword argument 'unsigned'
>
> > Thanks
> > Mathieu
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "sqlalchemy" group.
> > To post to this group, send email to sqlalch...@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.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@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.

Reply via email to