From: fulv on
I get the following error:

File "<stdin>", line 1, in ?
File "/Users/fulvio/plone/seiu_new/buildout/eggs/z3c.saconfig-0.11-
py2.4.egg/z3c/saconfig/utility.py", line 164, in __call__
_ENGINES[self._key] = engine = sqlalchemy.create_engine(
File "/Users/fulvio/plone/seiu_new/buildout/eggs/SQLAlchemy-0.6.3-
py2.4.egg/sqlalchemy/engine/__init__.py", line 244, in create_engine
return strategy.create(*args, **kwargs)
TypeError: create() takes exactly 2 non-keyword arguments (150 given)

Basically, args and kwargs come as the return values from my
overridden function configuration():

args, kw = self.configuration()
_ENGINES[self._key] = engine =
sqlalchemy.create_engine(
*args, **kw)


This is what I'm returning from configuration():

args = (connection_string)
kwargs = {'echo' : True, 'encoding' : 'cp1252'}
return args, kwargs

In other words, args is a list containing just one string. It seems
to me that create_engine is interpreting that as a list of 150
characters.

Any suggestions, on what I'm doing wrong?

Thanks!
Fulvio
From: James Mills on
On Thu, Jul 22, 2010 at 4:26 PM, fulv <fulviocasali(a)gmail.com> wrote:
>  args = (connection_string)

Replace this with:

args = (connection_string,)

NOTE: The trailing , (comma) indicating that this _is_ a tuple.

cheers
James

--
-- James Mills
--
-- "Problems are solved by method"
From: fulv on

Thank you all! Really appreciate the quick help!