Error in 2.0.6: run() got multiple values for keyword argument 'ssl_context'
matthayes opened this issue · 4 comments
matthayes commented
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?
anthraxx commented
@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=
matthayes commented
Ah okay, thanks!
anthraxx commented
You are welcome. If that solves the problem for you please mark this issue as closed.
Cheers
matthayes commented
I confirmed this fixed the issue, thanks again.