apache / superset

Apache Superset is a Data Visualization and Data Exploration Platform
https://superset.apache.org/
Apache License 2.0
61.59k stars 13.45k forks source link

'Docker-compose up' throws: ModuleNotFoundError: No module named 'func_timeout' #18675

Closed MFizz closed 2 years ago

MFizz commented 2 years ago

When I try to follow that guide for creating a custom viz-plugin: https://superset.apache.org/docs/installation/building-custom-viz-plugins I can't run the docker container because it throws the error: ModuleNotFoundError ModuleNotFoundError: No module named 'func_timeout'

How to reproduce the bug

  1. Go to https://superset.apache.org/docs/installation/building-custom-viz-plugins
  2. Have a Mac or linux-based machine
  3. Install Docker
  4. Clone the repository to your computer
  5. Use your terminal to cd into the superset directory
  6. Run docker-compose up When I open localhost now I get the error: ModuleNotFoundError ModuleNotFoundError: No module named 'func_timeout' and the server console is putting out the same error. Completing the other steps in the guide don't work as well.

I can run the docker in dev mode when I specify the 1.4.0 release but then the viz-plugin creation process as described here is not working.

Expected results

A working dev superset instance.

Actual results

| 2022-02-11 09:29:46,703:INFO:superset.utils.logging_configurator:logging was configured successfully
superset_app             | 2022-02-11 09:29:46,706:INFO:root:Configured event logger of type <class 'superset.utils.log.DBEventLogger'>
superset_app             | 2022-02-11 09:29:46,789:ERROR:superset.app:Failed to create app
superset_app             | Traceback (most recent call last):
superset_app             |   File "/app/superset/app.py", line 37, in create_app
superset_app             |     app_initializer.init_app()
superset_app             |   File "/app/superset/initialization/__init__.py", line 616, in init_app
superset_app             |     self.init_app_in_ctx()
superset_app             |   File "/app/superset/initialization/__init__.py", line 576, in init_app_in_ctx
superset_app             |     self.init_views()
superset_app             |   File "/app/superset/initialization/__init__.py", line 139, in init_views
superset_app             |     from superset.databases.api import DatabaseRestApi
superset_app             |   File "/app/superset/databases/api.py", line 35, in <module>
superset_app             |     from superset.databases.commands.create import CreateDatabaseCommand
superset_app             |   File "/app/superset/databases/commands/create.py", line 33, in <module>
superset_app             |     from superset.databases.commands.test_connection import TestConnectionDatabaseCommand
superset_app             |   File "/app/superset/databases/commands/test_connection.py", line 25, in <module>
superset_app             |     from func_timeout import func_timeout, FunctionTimedOut
superset_app             | ModuleNotFoundError: No module named 'func_timeout'

Environment

Checklist

Make sure to follow these steps before submitting your issue - thank you!

ad-m commented 2 years ago

@MFizz could you run docker-compose pull and try again?

MFizz commented 2 years ago

@ad-m Thank you that worked!