That's not an error I'm familiar with how to reproduce; it suggests an
incorrect string passed to create_engine(). Working code with Python 3.2 plus
pg8000 looks like:
from sqlalchemy import create_engine
e = create_engine("postgresql+pg8000://scott:tiger@localhost/test")
print(e.execute("select 1").scalar())
Note that we're at 99.7% test success for Python 3.2 + pg8000, there's only 8
failures which are basically platform-dependent issues with the tests
themselves:
http://paste.pocoo.org/show/362703/
On Mar 30, 2011, at 11:13 AM, Hans-Martin wrote:
> Sorry, I was not expecting it to work, just trying to follow your
> suggestion.
>
> SQLAlchemy Dev snapshot + pg8000 from
> http://pybrary.net/pg8000/dist/pg8000-py3-1.08.tar.gz
> throws this error:
>
> Traceback (most recent call last):
> File "set_meta_info_levels_0_1.py", line 60, in <module>
> set_up_schemata()
> File " src/library/db_connect.py", line 64, in set_up_schemata
> if s not in existing_schemata():
> File " src/library/db_connect.py", line 60, in existing_schemata
> tmp = session.execute("""SELECT schema_name FROM
> information_schema.schemata;""")
> File " lib/python3.2/site-packages/SQLAlchemy-0.7b4dev-py3.2.egg/
> sqlalchemy/orm/session.py", line 758, in execute
> return self._connection_for_bind(bind,
> close_with_result=True).execute(
> File " lib/python3.2/site-packages/SQLAlchemy-0.7b4dev-py3.2.egg/
> sqlalchemy/orm/session.py", line 694, in _connection_for_bind
> return self.transaction._connection_for_bind(engine)
> File " lib/python3.2/site-packages/SQLAlchemy-0.7b4dev-py3.2.egg/
> sqlalchemy/orm/session.py", line 246, in _connection_for_bind
> conn = bind.contextual_connect()
> File " lib/python3.2/site-packages/SQLAlchemy-0.7b4dev-py3.2.egg/
> sqlalchemy/engine/base.py", line 2062, in contextual_connect
> self.pool.connect(),
> File " lib/python3.2/site-packages/SQLAlchemy-0.7b4dev-py3.2.egg/
> sqlalchemy/pool.py", line 208, in connect
> return _ConnectionFairy(self).checkout()
> File " lib/python3.2/site-packages/SQLAlchemy-0.7b4dev-py3.2.egg/
> sqlalchemy/pool.py", line 369, in __init__
> rec = self._connection_record = pool._do_get()
> File " lib/python3.2/site-packages/SQLAlchemy-0.7b4dev-py3.2.egg/
> sqlalchemy/pool.py", line 695, in _do_get
> con = self._create_connection()
> File " lib/python3.2/site-packages/SQLAlchemy-0.7b4dev-py3.2.egg/
> sqlalchemy/pool.py", line 173, in _create_connection
> return _ConnectionRecord(self)
> File " lib/python3.2/site-packages/SQLAlchemy-0.7b4dev-py3.2.egg/
> sqlalchemy/pool.py", line 254, in __init__
> self.connection = self.__connect()
> File " lib/python3.2/site-packages/SQLAlchemy-0.7b4dev-py3.2.egg/
> sqlalchemy/pool.py", line 314, in __connect
> connection = self.__pool._creator()
> File " lib/python3.2/site-packages/SQLAlchemy-0.7b4dev-py3.2.egg/
> sqlalchemy/engine/strategies.py", line 84, in connect
> e, dialect.dbapi.Error) from e
> sqlalchemy.exc.DBAPIError: (TypeError) connect() takes at least 1
> argument (1 given) None None
>
>
> I have a working setup with 2.7 + 0.6.6, but would like to port it to
> 3.2 relatively soon -- if I can help trying out things, just let me
> know.
>
> Best wishes,
> Hans-Martin
>
> --
> 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.