question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to start Superset

See original GitHub issue

Trying to follow the instructions and failing already at superset load_examples

Expected results

I expected this line to pass successfully.

Actual results

Executing superset load_examples yields:

2020-01-13 09:38:56,408:INFO:root:logging was configured successfully
2020-01-13 09:38:56,505:INFO:root:Configured event logger of type <class 'superset.utils.log.DBEventLogger'>
Traceback (most recent call last):
  File "/Users/user/anaconda3/envs/incubator-superset/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1246, in _execute_context
    cursor, statement, parameters, context
  File "/Users/user/anaconda3/envs/incubator-superset/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 581, in do_execute
    cursor.execute(statement, parameters)
sqlite3.OperationalError: no such table: dbs

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/user/anaconda3/envs/incubator-superset/bin/superset", line 31, in <module>
    cli()
  File "/Users/user/anaconda3/envs/incubator-superset/lib/python3.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Users/user/anaconda3/envs/incubator-superset/lib/python3.7/site-packages/flask/cli.py", line 586, in main
    return super(FlaskGroup, self).main(*args, **kwargs)
  File "/Users/user/anaconda3/envs/incubator-superset/lib/python3.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Users/user/anaconda3/envs/incubator-superset/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/user/anaconda3/envs/incubator-superset/lib/python3.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/user/anaconda3/envs/incubator-superset/lib/python3.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/Users/user/anaconda3/envs/incubator-superset/lib/python3.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/Users/user/anaconda3/envs/incubator-superset/lib/python3.7/site-packages/flask/cli.py", line 426, in decorator
    return __ctx.invoke(f, *args, **kwargs)
  File "/Users/user/anaconda3/envs/incubator-superset/lib/python3.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/Users/user/anaconda3/envs/incubator-superset/lib/python3.7/site-packages/superset/cli.py", line 142, in load_examples
    load_examples_run(load_test_data, only_metadata, force)
  File "/Users/user/anaconda3/envs/incubator-superset/lib/python3.7/site-packages/superset/cli.py", line 77, in load_examples_run
    examples_db = utils.get_example_database()
  File "/Users/user/anaconda3/envs/incubator-superset/lib/python3.7/site-packages/superset/utils/core.py", line 976, in get_example_database
    return get_or_create_db("examples", db_uri)
  File "/Users/user/anaconda3/envs/incubator-superset/lib/python3.7/site-packages/superset/utils/core.py", line 960, in get_or_create_db
    db.session.query(models.Database).filter_by(database_name=database_name).first()
  File "/Users/user/anaconda3/envs/incubator-superset/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3265, in first
    ret = list(self[0:1])
  File "/Users/user/anaconda3/envs/incubator-superset/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3043, in __getitem__
    return list(res)
  File "/Users/user/anaconda3/envs/incubator-superset/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3367, in __iter__
    return self._execute_and_instances(context)
  File "/Users/user/anaconda3/envs/incubator-superset/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3392, in _execute_and_instances
    result = conn.execute(querycontext.statement, self._params)
  File "/Users/user/anaconda3/envs/incubator-superset/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 982, in execute
    return meth(self, multiparams, params)
  File "/Users/user/anaconda3/envs/incubator-superset/lib/python3.7/site-packages/sqlalchemy/sql/elements.py", line 287, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/Users/user/anaconda3/envs/incubator-superset/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1101, in _execute_clauseelement
    distilled_params,
  File "/Users/user/anaconda3/envs/incubator-superset/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1250, in _execute_context
    e, statement, parameters, cursor, context
  File "/Users/user/anaconda3/envs/incubator-superset/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1476, in _handle_dbapi_exception
    util.raise_from_cause(sqlalchemy_exception, exc_info)
  File "/Users/user/anaconda3/envs/incubator-superset/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 398, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/Users/user/anaconda3/envs/incubator-superset/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 152, in reraise
    raise value.with_traceback(tb)
  File "/Users/user/anaconda3/envs/incubator-superset/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1246, in _execute_context
    cursor, statement, parameters, context
  File "/Users/user/anaconda3/envs/incubator-superset/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 581, in do_execute
    cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: dbs
[SQL: SELECT dbs.created_on AS dbs_created_on, dbs.changed_on AS dbs_changed_on, dbs.id AS dbs_id, dbs.verbose_name AS dbs_verbose_name, dbs.database_name AS dbs_database_name, dbs.sqlalchemy_uri AS dbs_sqlalchemy_uri, dbs.password AS dbs_password, dbs.cache_timeout AS dbs_cache_timeout, dbs.select_as_create_table_as AS dbs_select_as_create_table_as, dbs.expose_in_sqllab AS dbs_expose_in_sqllab, dbs.allow_run_async AS dbs_allow_run_async, dbs.allow_csv_upload AS dbs_allow_csv_upload, dbs.allow_ctas AS dbs_allow_ctas, dbs.allow_dml AS dbs_allow_dml, dbs.force_ctas_schema AS dbs_force_ctas_schema, dbs.allow_multi_schema_metadata_fetch AS dbs_allow_multi_schema_metadata_fetch, dbs.extra AS dbs_extra, dbs.perm AS dbs_perm, dbs.impersonate_user AS dbs_impersonate_user, dbs.created_by_fk AS dbs_created_by_fk, dbs.changed_by_fk AS dbs_changed_by_fk
FROM dbs
WHERE dbs.database_name = ?
 LIMIT ? OFFSET ?]
[parameters: ('examples', 1, 0)]
(Background on this error at: http://sqlalche.me/e/e3q8)

Screenshots

N/A

How to reproduce the bug

  1. New Conda environment
  2. env LDFLAGS="-L$(brew --prefix openssl)/lib" CFLAGS="-I$(brew --prefix openssl)/include" pip install cryptography==2.4.2
  3. pip install apache-superset
  4. flask fab create-admin
  5. superset load_examples

Environment

(please complete the following information):

  • superset version: 0.35.1
  • python version: 3.7.6
  • node.js version: v13.2.0
  • npm version: 6.13.1

Checklist

Make sure these boxes are checked before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven’t found one similar.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
dpgasparcommented, Jan 13, 2020

Ok, thank you

The log looks good. The initial process should be:

1 - pip install apache-superset 2 - superset db upgrade 3 - flask fab create-admin 4 - superset load_examples

The default sqllite db is on ~/.superset/superset.db. You can proceed now with steps 3 and 4.

0reactions
imvemuricommented, Jan 21, 2020

@dpgaspar : How come then the docker-init.sh script creates admin user before initializing the database?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to start superset with reporting via docker-compose
I had to modify db section to external: false . I have been trying to play around with various values for SQLALCHEMY_DATABASE_URI ("postgresql+ ......
Read more >
python 3.x - Unable to start Apache Superset due to failed ...
Try removing all the containers and images and again build the Apache Superset with docker compose.I generally start the Apache Superset ...
Read more >
Unable to start Apache Superset due to failed PostgresDB ...
[Solved]-Unable to start Apache Superset due to failed PostgresDB connection using Docker-docker ... Try removing all the containers and images and again build ......
Read more >
Installation & Configuration - apache-superset - Read the Docs
Once you have Docker for Mac installed, open up the preferences pane for Docker, go to the “Resources” section and increase the allocated...
Read more >
Installing Locally Using Docker Compose - Apache Superset
Once you have Docker for Mac installed, open up the preferences pane for Docker, go to the "Resources" section and increase the allocated...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found