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.

Superset docker-compose gave error

See original GitHub issue

A clear and concise description of what the bug is.

I tried running the following code:

git clone https://github.com/apache/incubator-superset/
cd incubator-superset
# you can run this command everytime you need to start superset now:
docker-compose up

as mentioned here - https://superset.incubator.apache.org/installation.html#start-with-docker

Expected results

Expect Superset UI to allow me to access it and it should work.

Actual results

The UI didn’t recognize the credentials at first. Then I went inside the Docker container of superset named incubator-superset_superset and ran the following command:

superset fab create-admin \
              --username admin \
              --firstname Superset \
              --lastname Admin \
              --email admin@superset.com \
              --password admin

which I copied from here - https://github.com/apache/incubator-superset/blob/master/docker/docker-init.sh#L36.

I got authenticated successfully but got an error page, the content of which is as following:

sqlalchemy.exc.ProgrammingError
sqlalchemy.exc.ProgrammingError: (psycopg2.ProgrammingError) relation "user_attribute" does not exist
LINE 2: FROM user_attribute 
             ^

[SQL: SELECT user_attribute.welcome_dashboard_id AS user_attribute_welcome_dashboard_id 
FROM user_attribute 
WHERE user_attribute.user_id = %(user_id_1)s]
[parameters: {'user_id_1': '1'}]
(Background on this error at: http://sqlalche.me/e/f405)

Traceback (most recent call last)
File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1246, in _execute_context
cursor, statement, parameters, context
File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 581, in do_execute
cursor.execute(statement, parameters)
The above exception was the direct cause of the following exception:
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2463, in __call__
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2449, in wsgi_app
response = self.handle_exception(e)
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1866, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2446, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1951, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1820, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1949, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1935, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/app/superset/views/core.py", line 2633, in welcome
.filter_by(user_id=g.user.get_id())
File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 3355, in scalar
ret = self.one()
File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 3325, in one
ret = self.one_or_none()
File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 3294, in one_or_none
ret = list(self)
File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 3367, in __iter__
return self._execute_and_instances(context)
File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 3392, in _execute_and_instances
result = conn.execute(querycontext.statement, self._params)
File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 982, in execute
return meth(self, multiparams, params)
File "/usr/local/lib/python3.6/site-packages/sqlalchemy/sql/elements.py", line 287, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1101, in _execute_clauseelement
distilled_params,
File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1250, in _execute_context
e, statement, parameters, cursor, context
File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1476, in _handle_dbapi_exception
util.raise_from_cause(sqlalchemy_exception, exc_info)
File "/usr/local/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 398, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File "/usr/local/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 152, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1246, in _execute_context
cursor, statement, parameters, context
File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 581, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.ProgrammingError: (psycopg2.ProgrammingError) relation "user_attribute" does not exist
LINE 2: FROM user_attribute
^

[SQL: SELECT user_attribute.welcome_dashboard_id AS user_attribute_welcome_dashboard_id
FROM user_attribute
WHERE user_attribute.user_id = %(user_id_1)s]
[parameters: {'user_id_1': '1'}]
(Background on this error at: http://sqlalche.me/e/f405)
The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error.
To switch between the interactive traceback and the plaintext one, you can click on the "Traceback" headline. From the text traceback you can also create a paste of it. For code execution mouse-over the frame you want to debug and click on the console icon on the right side.

You can execute arbitrary Python code in the stack frames and there are some extra helpers available for introspection:

dump() shows all variables in the frame
dump(obj) dumps all that's known about the object

How to reproduce the bug

Run steps mentioned previously.

It is worth noting that when I follow the same steps with the branch 0.36 I do not see this problem. So it must be something that got introduced into the master branch but was not released in 0.36.

Environment

(please complete the following information):

  • superset version: master branch
  • python version: based on the docker-compose file
  • node.js version: based on the docker-compose file
  • npm version: based on the docker-compose file

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.

Additional context

Add any other context about the problem here.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
willbarrettcommented, Mar 9, 2020

Thanks for the report @akki - I’ll see if I can reproduce the error you’re running into today and get back to you.

0reactions
willbarrettcommented, Mar 12, 2020

No worries. We’re still evolving the docker-compose setup to be more reliable under a number of circumstances. I’ll close this for now given our inability to reproduce.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Apache Superset error when installing locally using Docker ...
Try running docker-compose down -v and then run docker compose up . If the above fails, try upgrading your docker installation. Installing a...
Read more >
Running "docker-compose up" fails to compile successfully ...
Cause: Git clone from any branch other than master, doesn't build & get all the required files/folders for docker to run in development...
Read more >
Installing Locally Using Docker Compose - Apache Superset
The fastest way to try Superset locally is using Docker and Docker Compose on a Linux or Mac OSX computer. Superset does not...
Read more >
Installation & Configuration - apache-superset - Read the Docs
Step 2 - Launch Superset via `docker-compose up` ... If you receive any errors during the installation of sqlalchemy_dremio , make sure to...
Read more >
Build a Superset service that sends report/alert with docker ...
You need Chrome or Firefox and it's driver installed in the superset image, but the original image doesn't. · Make a fresh new...
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