I have the following in my SQLAlchemy-based model.py:

recurring_tasks = Table('recurring_task', metadata,
                        #Column('rt_est_deploy_date', DateTime),
                        #Column('rt_start_date', DateTime),
                        autoload=True)

Regardless of whether the commented lines are commented or not, I get
the following error in tg-admin shell:

Traceback (most recent call last):
  File "/usr/local/bin/tg-admin", line 7, in ?
    sys.exit(
  File "/usr/lib/python2.4/site-packages/TurboGears-1.0.4.4-py2.4.egg/
turbogears/command/base.py", line 369, in main
    command.run()
  File "/usr/lib/python2.4/site-packages/TurboGears-1.0.4.4-py2.4.egg/
turbogears/command/base.py", line 169, in run
    mod = get_model()
  File "/usr/lib/python2.4/site-packages/TurboGears-1.0.4.4-py2.4.egg/
turbogears/util.py", line 131, in get_model
    package = __import__(package_name, {}, {}, ["model"])
  File "/tools/rtr-alchemy/rtralchemy/model.py", line 20, in ?
    autoload=True)
  File "/usr/lib/python2.4/site-packages/SQLAlchemy-0.5.0beta1-
py2.4.egg/sqlalchemy/schema.py", line 113, in __call__
    return type.__call__(self, name, metadata, *args, **kwargs)
  File "/usr/lib/python2.4/site-packages/SQLAlchemy-0.5.0beta1-
py2.4.egg/sqlalchemy/schema.py", line 236, in __init__
    _bind_or_error(metadata).reflecttable(self,
include_columns=include_columns)
  File "/usr/lib/python2.4/site-packages/SQLAlchemy-0.5.0beta1-
py2.4.egg/sqlalchemy/engine/base.py", line 1279, in reflecttable
    self.dialect.reflecttable(conn, table, include_columns)
  File "/usr/lib/python2.4/site-packages/SQLAlchemy-0.5.0beta1-
py2.4.egg/sqlalchemy/databases/mssql.py", line 603, in reflecttable
    coltype = coltype(*args)
  File "/usr/lib/python2.4/site-packages/SQLAlchemy-0.5.0beta1-
py2.4.egg/sqlalchemy/databases/mssql.py", line 117, in __init__
    super(MSDate, self).__init__(False)
TypeError: super(type, obj): obj must be an instance or subtype of
type


The underlying table is SQL Server 2005 and the data type is
smalldatetime.  There are no other date-related fields in any of the
other tables in my model and when I comment out this table, everything
works fine.

I would be grateful for any nods in the right direction, as I have
only just started using TurboGears and SQLAlchemy

Many thanks

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