Install fails on superset db upgrade step on centos
See original GitHub issueOverview
When installing superset with pip, the superset db upgrade
step fails.
Superset version
0.28.1
Expected results
No output.
Actual results
(venv) [centos@ip-172-16-1-141 venv]$ superset db upgrade
INFO [alembic.runtime.migration] Context impl SQLiteImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
INFO [alembic.runtime.migration] Running upgrade bddc498dd179 -> 4451805bbaa1, remove double percents
Traceback (most recent call last):
File "/home/centos/venv/bin/superset", line 15, in <module>
cli()
File "/home/centos/venv/lib64/python3.6/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/home/centos/venv/lib64/python3.6/site-packages/flask/cli.py", line 380, in main
return AppGroup.main(self, *args, **kwargs)
File "/home/centos/venv/lib64/python3.6/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/home/centos/venv/lib64/python3.6/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/centos/venv/lib64/python3.6/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/centos/venv/lib64/python3.6/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/centos/venv/lib64/python3.6/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/home/centos/venv/lib64/python3.6/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/centos/venv/lib64/python3.6/site-packages/flask/cli.py", line 257, in decorator
return __ctx.invoke(f, *args, **kwargs)
File "/home/centos/venv/lib64/python3.6/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/home/centos/venv/lib64/python3.6/site-packages/flask_migrate/cli.py", line 134, in upgrade
_upgrade(directory, revision, sql, tag, x_arg)
File "/home/centos/venv/lib64/python3.6/site-packages/flask_migrate/__init__.py", line 95, in wrapped
f(*args, **kwargs)
File "/home/centos/venv/lib64/python3.6/site-packages/flask_migrate/__init__.py", line 280, in upgrade
command.upgrade(config, revision, sql=sql, tag=tag)
File "/home/centos/venv/lib64/python3.6/site-packages/alembic/command.py", line 276, in upgrade
script.run_env()
File "/home/centos/venv/lib64/python3.6/site-packages/alembic/script/base.py", line 475, in run_env
util.load_python_file(self.dir, "env.py")
File "/home/centos/venv/lib64/python3.6/site-packages/alembic/util/pyfiles.py", line 90, in load_python_file
module = load_module_py(module_id, path)
File "/home/centos/venv/lib64/python3.6/site-packages/alembic/util/compat.py", line 156, in load_module_py
spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/centos/venv/lib64/python3.6/site-packages/superset/migrations/env.py", line 100, in <module>
run_migrations_online()
File "/home/centos/venv/lib64/python3.6/site-packages/superset/migrations/env.py", line 93, in run_migrations_online
context.run_migrations()
File "<string>", line 8, in run_migrations
File "/home/centos/venv/lib64/python3.6/site-packages/alembic/runtime/environment.py", line 839, in run_migrations
self.get_context().run_migrations(**kw)
File "/home/centos/venv/lib64/python3.6/site-packages/alembic/runtime/migration.py", line 361, in run_migrations
step.migration_fn(**kw)
File "/home/centos/venv/lib64/python3.6/site-packages/superset/migrations/versions/4451805bbaa1_remove_double_percents.py", line 82, in upgrade
replace('%%', '%')
File "/home/centos/venv/lib64/python3.6/site-packages/superset/migrations/versions/4451805bbaa1_remove_double_percents.py", line 53, in replace
.join(Table)
File "/home/centos/venv/lib64/python3.6/site-packages/sqlalchemy/orm/query.py", line 2234, in join
from_joinpoint=from_joinpoint,
File "<string>", line 2, in _join
File "/home/centos/venv/lib64/python3.6/site-packages/sqlalchemy/orm/base.py", line 220, in generate
fn(self, *args[1:], **kw)
File "/home/centos/venv/lib64/python3.6/site-packages/sqlalchemy/orm/query.py", line 2413, in _join
left, right, onclause, prop, create_aliases, outerjoin, full
File "/home/centos/venv/lib64/python3.6/site-packages/sqlalchemy/orm/query.py", line 2436, in _join_left_to_right
) = self._join_determine_implicit_left_side(left, right, onclause)
File "/home/centos/venv/lib64/python3.6/site-packages/sqlalchemy/orm/query.py", line 2567, in _join_determine_implicit_left_side
"Can't determine which FROM clause to join "
sqlalchemy.exc.InvalidRequestError: Can't determine which FROM clause to join from, there are multiple FROMS which can join to this entity. Try adding an explicit ON clause to help resolve the ambiguity.
Steps to reproduce
sudo pip install virtualenv
python3.6 -m venv venv
. venv/bin/activate
sudo pip install --upgrade setuptools pip
# Install superset
pip install superset
# Fix version compatibility problem
pip uninstall pandas
pip install pandas==0.23.4
# Continune install superset
fabmanager create-admin --app superset
superset db upgrade
At the db upgrade step, the install fails with an SQL related exception.
Environment
Python was installed with yum and IUS.
Centos 7 (centos-release-7-6.1810.2.el7.centos.x86_64)
Flask 0.12.4
Python 3.6.7 (default, Dec 5 2018, 15:02:05)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
pip 19.0.3
Superset 0.28.1
Issue Analytics
- State:
- Created 5 years ago
- Comments:6
Top Results From Across the Web
Install fails on superset db upgrade step on centos · Issue #6988
Overview When installing superset with pip, the superset db upgrade step fails. Superset version 0.28.1 Expected results No output.
Read more >Apache Superset-How to resolve Apache Superset DB ...
This is Quick Video on How to resolve Apache Superset DB Upgrade ... perform following steps : 1) Install OS Dependencies 2) Install...
Read more >SQLAlchemy error when upgrading Apache Superset
This problem has been resolved. Steps I took to solve it: Remove all Apache Superset dependencies;; Upgrade Ubuntu to 20.04;; Install ...
Read more >Installation & Configuration - apache-superset - Read the Docs
Follow these few simple steps to install Superset.: # Install superset pip install apache-superset # Initialize the database superset db upgrade # Create...
Read more >Installing From Scratch - Apache Superset
Superset stores database connection information in its metadata database. ... Also, on CentOS, you may need to upgrade pip for the install to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks @pawan92328 for the comment, that worked for me too. For convenience I am posting the steps for the workaround below.
This fix was done in the following environment:
I believe the dependencies should be made more explicit in the superset install then as there seems to be compatibility issues with the mentioned
pandas
andsqlalchemy
libraries.rm -rf ~/.superset