On Mar 26, 2011, at 6:54 PM, tanc wrote:
> Hi there,
> Im new to sqlalchemy, be kind and gentle :)
> Using sqlalchemy 0.6.6 and the last stable cx_Oracle.pyd on my windows
> pc.
> OracleXE 10g is installed locally.
>
> Processing the following code, gives me the error
> ImportError: cannot import name cx_Oracle
>
> import sqlalchemy
>
> sqlalchemy.create_engine('oracle://hr:hr@XE')
> connection = oracle_db.connect()
> result = connection.execute("select employee_id,first_name,last_name
> from Employees")
> for row in result:
> print (row)
> connection.close()
>
> This sound to be launched by the following code within cx_oracle
>
> def dbapi(cls):
> from . import cx_Oracle
> return cx_Oracle
>
> Tried to fix without success.
> Calling similar code from cx_Oracle is running fine.
> Can someone point me on the right direction ?
> Regards,
One aspect may be that the SQLAlchemy Oracle dialect has never been tested with
Python 3 and likely has a lot of issues. I know you're using Python 3 due to
the relative import in the code snippet you're attaching (a very important
detail).
I'd strongly advise you stick with Python 2 until library maintainers have
finished getting their act together. We're mostly getting much closer, but its
still kind of early for end users.
>
> --
> 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.