smurfix/flask-script

Error in 2.0.6: run() got multiple values for keyword argument 'ssl_context'

matthayes opened this issue · 4 comments

I started seeing this error when upgrading to 2.0.6 from 2.0.5:

  File "/home/app/python_venv/lib/python3.6/site-packages/flask_script/__init__.py", line 417, in run
    result = self.handle(argv[0], argv[1:])
  File "/home/app/python_venv/lib/python3.6/site-packages/flask_script/__init__.py", line 386, in handle
    res = handle(*args, **config)
  File "/home/app/python_venv/lib/python3.6/site-packages/flask_script/commands.py", line 479, in __call__
    **self.server_options)
TypeError: <flask_script.commands.Server object at 0x7f3b47bcf5c0>: run() got multiple values for keyword argument 'ssl_context'

I'm setting up the command like this:

        manager.add_command("runserver", Server(host="::",
                                                port=bind_port,
                                                ssl_context=("something.crt", "something.key")))

What am I doing wrong?

@matthayes the option got changed in c6604eb
You will need to pass them explicitly via:
ssl_crt="something.crt", ssl_key="something.key"
instead of using a tuple via ssl_context=

Ah okay, thanks!

I confirmed this fixed the issue, thanks again.