-
-
Notifications
You must be signed in to change notification settings - Fork 203
-
Was pulling my hair out today to track down a new error on quart / hypercorn related to PROVIDE_AUTOMATIC_OPTIONS.
Managed to track it down to the recent 3.1.0 release of flask, and @pgjones looks like you fixed but have not released this already. 2473a04
I'm new to quart so be kind, and probably have missed a lot of crossover an nuance.
This was my stack trace, and have fixed now by putting flask==3.0.3 before quart in my package installs. Are there any other workarounds which might be a bit more elegant, or different ways to configure options?
(.venv) ~/PycharmProjects/Fluid Website Discovery/backend git:[main]
hypercorn -c hypercorn_config.toml fluid_discovery_api:run_app
Starting the Quart application...
Process SpawnProcess-1:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/multiprocessing/process.py", line 314, in _bootstrap
self.run()
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/Users/adam/PycharmProjects/Fluid Website Discovery/.venv/lib/python3.12/site-packages/hypercorn/asyncio/run.py", line 187, in asyncio_worker
app = load_application(config.application_path, config.wsgi_max_body_size)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/adam/PycharmProjects/Fluid Website Discovery/.venv/lib/python3.12/site-packages/hypercorn/utils.py", line 110, in load_application
module = import_module(import_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/importlib/init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1381, in _gcd_import
File "", line 1354, in _find_and_load
File "", line 1325, in _find_and_load_unlocked
File "", line 929, in _load_unlocked
File "", line 994, in exec_module
File "", line 488, in _call_with_frames_removed
File "/Users/adam/PycharmProjects/Fluid Website Discovery/backend/fluid_discovery_api.py", line 57, in
app = create_app() # Initialize Quart app
^^^^^^^^^^^^
File "/Users/adam/PycharmProjects/Fluid Website Discovery/backend/fluid_discovery_api.py", line 30, in create_app
app = Quart(name)
^^^^^^^^^^^^^^^
File "/Users/adam/PycharmProjects/Fluid Website Discovery/.venv/lib/python3.12/site-packages/quart/app.py", line 338, in init
self.add_url_rule(
File "/Users/adam/PycharmProjects/Fluid Website Discovery/.venv/lib/python3.12/site-packages/flask/sansio/scaffold.py", line 47, in wrapper_func
return f(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/adam/PycharmProjects/Fluid Website Discovery/.venv/lib/python3.12/site-packages/flask/sansio/app.py", line 641, in add_url_rule
if "OPTIONS" not in methods and self.config["PROVIDE_AUTOMATIC_OPTIONS"]:
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'PROVIDE_AUTOMATIC_OPTIONS'
Beta Was this translation helpful? Give feedback.
All reactions
It was a temporary incompatibility with Flask 3.1. The release fixing this is literally being built and uploaded right now.
Replies: 2 comments 1 reply
-
It was a temporary incompatibility with Flask 3.1. The release fixing this is literally being built and uploaded right now.
Beta Was this translation helpful? Give feedback.
All reactions
-
Quart 0.19.9 is now available on PyPI.
Beta Was this translation helpful? Give feedback.
All reactions
-
Excellent, thank you @davidism
Beta Was this translation helpful? Give feedback.