wmjie / ibm-db

Automatically exported from code.google.com/p/ibm-db
0 stars 0 forks source link

Error raised when I run db2_engine=sqlalchemy.create_engine #97

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I have done the installation as README suggests.
2. Run the python code I wrote.
import sqlalchemy
import ibm_db_sa.ibm_db
from sqlalchemy import *
db2_engine=sqlalchemy.create_engine('ibm_db_sa://db2inst1:pass@localhost:50000/n
ova',echo=True)
3. There should be no error, but I have got the error message.

What is the expected output? What do you see instead?
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/__init__.py", line 263, in create_engine
    return strategy.create(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py", line 66, in create
    dbapi = dialect_cls.dbapi(**dbapi_args)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/connectors/zxJDBC.py", line 26, in dbapi
    from com.ziclix.python.sql import zxJDBC
ImportError: No module named com.ziclix.python.sql

What version of the product are you using? On what operating system?
I am using Python 2.7.2, SQLAlchemy 0.6.8, and ibm_db 1.0.5. I checked out the 
code of ibm_db_sa from the trunk.

Original issue reported on code.google.com by houshen...@gmail.com on 17 Feb 2012 at 3:23

GoogleCodeExporter commented 9 years ago
The main branch of ibm_db_sa only supports SQLAlchemy 0.4.x, but 
http://code.google.com/p/ibm-db/source/browse/#svn%2Fbranches%2Fibm_db_sa 
branch supports SQLAlchemy 0.6.x and SQLAlchemy 0.7.x.

You can give a try to this branch and let us know how it works for you.

Original comment by rahul.pr...@in.ibm.com on 17 Feb 2012 at 6:27

GoogleCodeExporter commented 9 years ago

Original comment by rahul.pr...@in.ibm.com on 21 Feb 2012 at 4:47

GoogleCodeExporter commented 9 years ago
Thank you, I will check on this.

Original comment by jaimy.azle on 27 Feb 2012 at 3:08

GoogleCodeExporter commented 9 years ago
ibm_db_sa-0.3.0 has been released which supports SQLAlchemy-0.7.3 and above.

Original comment by rahul.pr...@in.ibm.com on 4 Mar 2013 at 5:25