-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ModuleNotFoundError: No module named 'superset.cli'; 'superset' is not a package flask fab create-admin #7942
Comments
Issue-Label Bot is automatically applying the label Links: app homepage, dashboard and code for this bot. |
|
superset is installed but am facing the issue when am trying to create credential for the flask app using command flask fab create-admin I have set the environment FLASK_APP variable so when am creating the credentials, am getting the above error i.e ModuleNotFoundError: No module named 'superset.cli'; 'superset' is not a package. |
Hi @harish345, Windows is not supported, having said that, your Video: |
I think there might be some kind of a problem in the installation procedure. I am working on Ubuntu 18.04.2 LTS and I faced the same issue. The point is Flask wants a *.py file but if you rename it then you will get another error after you type in the admin user details: "ModuleNotFoundError: No module named 'superset.cli'; 'superset' is not a package". Having both versions of the file (with and without ".py") does not help. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue |
I am facing same issue in mac. trying to install apache/superset:1.3.2 using docker compose and fails with below error. ###################################################################### Loaded your LOCAL configuration at [/app/docker/pythonpath_dev/superset_config.py] Traceback (most recent call last): File "/usr/local/bin/superset", line 33, in
File "/usr/local/bin/superset", line 25, in importlib_load_entry_point
File "/usr/local/lib/python3.8/importlib/metadata.py", line 77, in load
File "/usr/local/lib/python3.8/importlib/init.py", line 127, in import_module
File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 970, in _find_and_load_unlocked ModuleNotFoundError: No module named 'superset.cli.main'; 'superset.cli' is not a package |
any one resolve this bug ? |
Hi team,
Am trying to setup apache superset in windows 10.
But am unable to create admin used using flask fab create-admin.
Am followed below steps , but am getting an ModuleNotFoundError.
Please help.
(myenv) E:\Apache-Superset\myenv\Scripts>set FLASK_APP=superset
(myenv) E:\Apache-Superset\myenv\Scripts>flask fab create-admin
Traceback (most recent call last):
File "c:\python\python36\Lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "c:\python\python36\Lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "E:\Apache-Superset\myenv\Scripts\flask.exe_main.py", line 9, in
File "e:\apache-superset\myenv\lib\site-packages\flask\cli.py", line 513, in main
cli.main(args=args, prog_name=name)
File "e:\apache-superset\myenv\lib\site-packages\flask\cli.py", line 377, in main
obj = ScriptInfo(create_app=self.create_app)
File "e:\apache-superset\myenv\lib\site-packages\flask\cli.py", line 205, in init
app_import_path = find_default_import_path()
File "e:\apache-superset\myenv\lib\site-packages\flask\cli.py", line 119, in find_default_import_path
return prepare_exec_for_file(app)
File "e:\apache-superset\myenv\lib\site-packages\flask\cli.py", line 66, in prepare_exec_for_file
'extension to .py' % filename)
flask.cli.NoAppException: The file provided (superset) does exist but is not a valid Python file. This means that it cannot be used as application. Please change the extension to .py
#copied the superset file to another location and changed the extension to .py
(myenv) E:\Apache-Superset\myenv\Scripts>set FLASK_APP=E:\Apache-Superset\superset.py
(myenv) E:\Apache-Superset\myenv\Scripts>flask fab create-admin
Username [admin]: admin
User first name [admin]: admin
User last name [user]: admin
Email [admin@fab.org]: admin
Password:
Repeat for confirmation:
Traceback (most recent call last):
File "c:\python\python36\Lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "c:\python\python36\Lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "E:\Apache-Superset\myenv\Scripts\flask.exe_main.py", line 9, in
File "e:\apache-superset\myenv\lib\site-packages\flask\cli.py", line 513, in main
cli.main(args=args, prog_name=name)
File "e:\apache-superset\myenv\lib\site-packages\flask\cli.py", line 380, in main
return AppGroup.main(self, *args, **kwargs)
File "e:\apache-superset\myenv\lib\site-packages\click\core.py", line 697, in main
rv = self.invoke(ctx)
File "e:\apache-superset\myenv\lib\site-packages\click\core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "e:\apache-superset\myenv\lib\site-packages\click\core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "e:\apache-superset\myenv\lib\site-packages\click\core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "e:\apache-superset\myenv\lib\site-packages\click\core.py", line 535, in invoke
return callback(*args, **kwargs)
File "e:\apache-superset\myenv\lib\site-packages\click\decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "e:\apache-superset\myenv\lib\site-packages\flask\cli.py", line 256, in decorator
with __ctx.ensure_object(ScriptInfo).load_app().app_context():
File "e:\apache-superset\myenv\lib\site-packages\flask\cli.py", line 237, in load_app
rv = locate_app(self.app_import_path)
File "e:\apache-superset\myenv\lib\site-packages\flask\cli.py", line 90, in locate_app
import(module)
File "E:\Apache-Superset\superset.py", line 6, in
from superset.cli import create_app
ModuleNotFoundError: No module named 'superset.cli'; 'superset' is not a package
The text was updated successfully, but these errors were encountered: