superset icon indicating copy to clipboard operation
superset copied to clipboard

[Question] No module named 'cx_Oracle' with docker run

Open gry77 opened this issue 6 years ago • 3 comments

I have included cx_Oracle in setup.py in extras_require section as below and rerun

docker-compose up
extras_require={
        "bigquery": ["pybigquery>=0.4.10", "pandas_gbq>=0.10.0"],
        "cors": ["flask-cors>=2.0.0"],
        "gsheets": ["gsheetsdb>=0.1.9"],
        "hive": ["pyhive[hive]>=0.6.1", "tableschema", "thrift>=0.11.0, <1.0.0"],
        "mysql": ["mysqlclient==1.4.2.post1"],
        "postgres": ["psycopg2-binary==2.7.5"],
        "presto": ["pyhive[presto]>=0.4.0"],
        "elasticsearch": ["elasticsearch-dbapi>=0.1.0, <0.2.0"],
        "druid": ["pydruid==0.5.7", "requests==2.22.0"],
        "hana": ["hdbcli==2.4.162", "sqlalchemy_hana==0.4.0"],
        "cx_Oracle": ["cx-Oracle==7.3.0"]
    },

However when I try to add database from UI, below error is popping up :

ERROR: {"error": "Connection failed!\n\nThe error message returned was:\nNo module named 'cx_Oracle'", "stacktrace": "Traceback (most recent call last):\n File "/app/superset/views/core.py", line 1769, in testconn\n engine = database.get_sqla_engine(user_name=username)\n File "/app/superset/utils/core.py", line 130, in call\n value = self.func(*args, **kwargs)\n File "/app/superset/models/core.py", line 971, in get_sqla_engine\n return create_engine(sqlalchemy_url, **params)\n File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/init.py", line 435, in create_engine\n return strategy.create(*args, **kwargs)\n File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/strategies.py", line 87, in create\n dbapi = dialect_cls.dbapi(**dbapi_args)\n File "/usr/local/lib/python3.6/site-packages/sqlalchemy/dialects/oracle/cx_oracle.py", line 827, in dbapi\n import cx_Oracle\nModuleNotFoundError: No module named 'cx_Oracle'\n"}

Did I do anything wrong ?

gry77 avatar Dec 19 '19 04:12 gry77

Issue-Label Bot is automatically applying the label #question to this issue, with a confidence of 0.95. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

issue-label-bot[bot] avatar Dec 19 '19 04:12 issue-label-bot[bot]

Try doing a docker-compose down first. That will force a rebuild of the image.

craig-rueda avatar Dec 19 '19 15:12 craig-rueda

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

stale[bot] avatar Feb 18 '20 01:02 stale[bot]