On Jul 20, 2010, at 3:34 PM, fulv wrote:

> I have the following stack, which works fine on two different Linux
> systems, but produces the error below on a Mac OS X 10.6.4 machine:
> 
> - Ubuntu 10.04 / Fedora 8 (works)   -   Mac OS X 10.6.4 (does not
> work)
> - freeTDS 0.82
> - unixODBC 2.3.0
> - pyodbc 2.1.7
> - collective.lead 1.0
> - SQLAlchemy 0.4.8
> - Zope 2.10.11
> - Plone 3.3.5
> 
> From the debugger (bin/instance debug) I can make simple connections
> and execute simple queries, both using pyodbc and sqlalchemy.
> Basically, it looks like it's breaking at this line in _setup_tables
> (which overrides collective.lead.Database's):
> 
>        tables['WebRegions'] = Table('lut_WebRegions', metadata,
> autoload=True)

MS-SQL (I am guessing you're using MS-SQL based on the error message and the 
quoting style) support is extremely poor in SQLAlchemy 0.4.8, though this 
appears to be at least partially a FreeTDS issue.   Also OSX does not use 
unixODBC as far as I know, it uses iODBC.    You should at once be using 
SQLAlchemy 0.6.3 where our reflection tests pass just fine using FreeTDS + OSX 
+ default iODBC install + MS-SQL.   

> 
> 
> Any assistance or leads on where to go next would be greatly
> appreciated!
> 
> Thanks!
> 
> 2010-07-14 20:40:33 ERROR Zope.SiteErrorLog
> 1279165233.140.347153571577
> <a href="http://localhost:8080/mysite/@@database-controlpanel";>http://
> localhost:8080/mysite/@@database-controlpanel</a>
> Traceback (innermost last):
>  Module ZPublisher.Publish, line 119, in publish
>  Module ZPublisher.mapply, line 88, in mapply
>  Module Products.PDBDebugMode.runcall, line 70, in pdb_runcall
>  Module ZPublisher.Publish, line 42, in call_object
>  Module zope.formlib.form, line 769, in __call__
>  Module Products.Five.formlib.formbase, line 55, in update
>  Module zope.formlib.form, line 750, in update
>  Module zope.formlib.form, line 594, in success
>  Module plone.app.controlpanel.form, line 41, in handle_edit_action
>  Module mysite.content.browser.dbsettings, line 40, in _on_save
>  Module collective.lead.database, line 49, in invalidate
>  Module collective.lead.database, line 95, in _initialize_engine
>  Module mysite.content.db, line 61, in _setup_tables
>  Module sqlalchemy.schema, line 110, in __call__
>  Module sqlalchemy.schema, line 226, in __init__
>  Module sqlalchemy.engine.base, line 1275, in reflecttable
>  Module sqlalchemy.databases.mssql, line 570, in reflecttable
>  Module sqlalchemy.engine.base, line 844, in execute
>  Module sqlalchemy.engine.base, line 895, in execute_clauseelement
>  Module sqlalchemy.engine.base, line 907, in _execute_compiled
>  Module sqlalchemy.engine.base, line 916, in __execute_raw
>  Module sqlalchemy.engine.base, line 960, in _cursor_execute
>  Module sqlalchemy.engine.base, line 942, in _handle_dbapi_exception
> ProgrammingError: (ProgrammingError) ('The SQL contains 0 parameter
> markers, but 2 parameters were supplied', 'HY000') u'SELECT
> [COLUMNS_1].[TABLE_SCHEMA], [COLUMNS_1].[TABLE_NAME], [COLUMNS_1].
> [COLUMN_NAME], [COLUMNS_1].[IS_NULLABLE], [COLUMNS_1].[DATA_TYPE],
> [COLUMNS_1].[ORDINAL_POSITION], [COLUMNS_1].
> [CHARACTER_MAXIMUM_LENGTH], [COLUMNS_1].[NUMERIC_PRECISION],
> [COLUMNS_1].[NUMERIC_SCALE],
> [COLUMNS_1].[COLUMN_DEFAULT] \nFROM [INFORMATION_SCHEMA].[COLUMNS] AS
> [COLUMNS_1] \nWHERE [COLUMNS_1].[TABLE_NAME] = ? AND
> [COLUMNS_1].[TABLE_SCHEMA] = ? ORDER BY [COLUMNS_1].
> [ORDINAL_POSITION]' ['lut_WebRegions', 'dbo']
>> /Users/fulvio/plone/mysite/buildout/eggs/SQLAlchemy-0.4.8-py2.4.egg/sqlalchemy/engine/base.py(944)_handle_dbapi_exception()
> -> del self._reentrant_error
> 
> -- 
> 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.
> 

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