Incubator-superset: Error logging in to superset (sqlalchemy.exc.ProgrammingError)

Created on 7 Nov 2020  路  4Comments  路  Source: apache/incubator-superset

A clear and concise description of what the bug is.

Expected results

login panel

Actual results

sqlalchemy.exc.ProgrammingError
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) relation "ab_permission_view_role" does not exist
LINE 2: FROM ab_permission_view JOIN ab_permission_view_role ON ab_p...
^

[SQL: SELECT ab_permission_view.id AS ab_permission_view_id, ab_permission_view.permission_id AS ab_permission_view_permission_id, ab_permission_view.view_menu_id AS ab_permission_view_view_menu_id
FROM ab_permission_view JOIN ab_permission_view_role ON ab_permission_view.id = ab_permission_view_role.permission_view_id JOIN ab_role ON ab_role.id = ab_permission_view_role.role_id JOIN ab_permission ON ab_permission.id = ab_permission_view.permission_id JOIN ab_view_menu ON ab_view_menu.id = ab_permission_view.view_menu_id
WHERE ab_permission.name = %(name_1)s AND ab_role.id IN (%(id_1)s)]
[parameters: {'name_1': 'menu_access', 'id_1': 2}]
(Background on this error at: http://sqlalche.me/e/13/f405)

Screenshots

If applicable, add screenshots to help explain your problem.

How to reproduce the bug

Following the instructions on https://preset.io/blog/2020-05-11-getting-started-installing-superset/,

  1. git clone https://github.com/apache/incubator-superset.git
  2. cd incubator-superset
  3. docker-compose up
    but unable to get to the l
    4.open: http://localhost:8088

In the docker-compose up output, I see an error related to ab_permission, pasted below
superset_init | sqlalchemy_exception, with_traceback=exc_info[2], from_=e
superset_init | File "/usr/local/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
superset_init | raise exception
superset_init | File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1277, in _execute_context
superset_init | cursor, statement, parameters, context
superset_init | File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 593, in do_execute
superset_init | cursor.execute(statement, parameters)
superset_init | sqlalchemy.exc.InternalError: (psycopg2.errors.InFailedSqlTransaction) current transaction is aborted, commands ignored until end of transaction block
superset_init |
superset_init | [SQL: SELECT ab_permission.id AS ab_permission_id, ab_permission.name AS ab_permission_name
superset_init | FROM ab_permission
superset_init | WHERE ab_permission.name = %(name_1)s]
superset_init | [parameters: {'name_1': 'all_datasource_access'}]
superset_init | (Background on this error at: http://sqlalche.me/e/13/2j85)
superset_app | 127.0.0.1 - - [07/Nov/2020 08:34:58] "GET /health HTTP/1.1" 200 -
superset_app | INFO:werkzeug:127.0.0.1 - - [07/Nov/2020 08:34:58] "GET /health HTTP/1.1" 200 -
superset_init exited with code 1

Environment

(please complete the following information):

  • python version: Python 3.6.3
#bug

All 4 comments

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

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

I have exactly the same error.

Table 'ab_permission_view_role' is missing but the db migrations run successfully.
Superset version: 0.37.2
@villebro can you help on this one?

Im also facing the same issue on windows, im really waiting for help, i can't run my superset instance!!

I share the following in hopes that my struggle will help someone else. After battling with this issue for over an hour, I was able to get past the error described in this issue by doing the following:

  1. In a terminal window run docker-compose up
  2. Once running, open the browser and observe the error described in this issue.
  3. In a separate terminal window run docker-compose down -v --remove-orphans
  4. Wait for both docker-compose processes to terminate.
  5. In the original terminal window run docker-compose pull and then docker-compose up --force-recreate --build

At this point, I could access the login screen at http://localhost:8088, but I could not login with the admin user. I shut down the instance (I don't recall how, most likely docker-compose down or docker-compose down -v --remove-orphans) and called it a day.

Today, running docker-compose up creates an instance that I can access with admin/admin.

$git statusreports

On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean

I hope this helps.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

deity-bram picture deity-bram  路  3Comments

fly-high-bj picture fly-high-bj  路  3Comments

kalimuthu123 picture kalimuthu123  路  3Comments

thoralf-gutierrez picture thoralf-gutierrez  路  3Comments

shyam2794 picture shyam2794  路  3Comments