Skip to content
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

Error: no such option: --app #7689

Closed
vibeesh opened this issue Jun 11, 2019 · 7 comments · Fixed by #7696
Closed

Error: no such option: --app #7689

vibeesh opened this issue Jun 11, 2019 · 7 comments · Fixed by #7696

Comments

@vibeesh
Copy link

vibeesh commented Jun 11, 2019

When i followed the documentation https://superset.incubator.apache.org/installation.html to install the superset (Cloud-native! - Start with Docker)
in the third step docker-compose run --rm superset ./docker-init.sh
i am getting an error
WARNING: Image for service superset was built because it did not already exist. To rebuild this image you must use docker-compose build or docker-compose up --build.

  • '[' 1 -ne 0 ']'
  • exec ./docker-init.sh
  • flask fab create-admin --app superset
    Error: no such option: --app

I tried with multiple machines and the result was same. I cannot continue further due to this error.

@issue-label-bot
Copy link

Issue Label Bot is not confident enough to auto-label this issue. See dashboard for more details.

@chengcx1019
Copy link

image
under the dir incubator-superset/contrib/docker, follow these:

  1. add this line - ./docker-init.sh:/home/superset/docker-init.sh to docker-compose.yml
  2. change lask fab create-admin --app superset to fabmanager create-admin --app superset in ./docker-init.sh
  3. run docker-compose run --rm superset ./docker-init.sh again

@dpgaspar
Copy link
Member

Hi @vibeesh,

My bad, submitted a PR to fix it. Can you please change docker-init.sh by correcting flask fab create-admin --app superset to flask fab create-admin

@Haks1
Copy link

Haks1 commented Jun 12, 2019

Hi,

Thanks @dpgaspar for this fix.

Don't forget docker rmi superset_superset before the docker-compose run

But still, it pops an other error, I think easy to fix :

Usage: flask fab create-admin [OPTIONS]

Error: Could not locate a Flask application. You did not provide the "FLASK_APP" environment variable, and a "wsgi.py" or "app.py" module was not found in the current directory.

@Haks1
Copy link

Haks1 commented Jun 12, 2019

Here the options for create-admin:

Usage: flask fab create-admin [OPTIONS]

  Creates an admin user

Options:
  --username TEXT
  --firstname TEXT
  --lastname TEXT
  --email TEXT
  --password TEXT
  --help            Show this message and exit.

It's not about the parameters, as the message says, it needs export FLASK_APP=superset before the create-admin to work.

So I did it, but it's still got an other error:

Traceback (most recent call last):
  File "/usr/local/bin/flask", line 10, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/site-packages/flask/cli.py", line 894, in main
    cli.main(args=args, prog_name=name)
  File "/usr/local/lib/python3.6/site-packages/flask/cli.py", line 557, in main
    return super(FlaskGroup, self).main(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1064, in invoke
    sub_ctx = cmd.make_context(cmd_name, args, parent=ctx)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 621, in make_context
    self.parse_args(ctx, args)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 880, in parse_args
    value, args = param.handle_parse_result(ctx, opts, args)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1396, in handle_parse_result
    value = self.full_process_value(ctx, value)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1680, in full_process_value
    return self.prompt_for_value(ctx)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1655, in prompt_for_value
    value_proc=lambda x: self.process_value(ctx, x))
  File "/usr/local/lib/python3.6/site-packages/click/termui.py", line 89, in prompt
    value = prompt_func(prompt)
  File "/usr/local/lib/python3.6/site-packages/click/termui.py", line 73, in prompt_func
    return f('')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc3 in position 4: invalid continuation byte

@Haks1
Copy link

Haks1 commented Jun 12, 2019

I've retried with ascii safe chars, got this message:

Usage: flask fab create-admin [OPTIONS]

Error: Failed to find Flask application or factory in module "superset". Use "FLASK_APP=superset:name to specify one.

I've tested export FLASK_APP=superset:app in the docker-init.sh but without success:

Usage: flask fab create-admin [OPTIONS]

Error: module 'superset' has no attribute 'app'

@Haks1
Copy link

Haks1 commented Jun 12, 2019

I've tried with fabmanager create-admin --app superset and I got this error:
"There is no appbuilder var on your package, you can use appbuilder parameter to config"

(I got also this same error if I try on branch 0.30)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants