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

Unable to generate refresh token - KeyError: 'PROVIDE_AUTOMATIC_OPTIONS #26

Closed
khadanja opened this issue Nov 14, 2024 · 5 comments
Closed

Comments

@khadanja
Copy link

khadanja commented Nov 14, 2024

Getting this as soon as I run python auth.py locally. Worked few months back.
app.py.py", line 5, in
app = Quart(name)
^^^^^^^^^^^^^^^
AppData\Local\Programs\Python\Python312\Lib\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'

@TheCaduceus
Copy link
Owner

Hi, looks like Quart recently pushed breaking changes which causing this issue. This can be fixed by degrading installed Quart version by running following command:
pip install quart==0.19.6

or mention it in requirements.txt file:
quart==0.19.6

@khadanja

@khadanja
Copy link
Author

khadanja commented Nov 14, 2024

@TheCaduceus Thanks for replying, same issue with 0.19.6
Downloading quart-0.19.6-py3-none-any.whl (78 kB)
Installing collected packages: quart
Attempting uninstall: quart
Found existing installation: Quart 0.19.8
Uninstalling Quart-0.19.8:
Successfully uninstalled Quart-0.19.8
Successfully installed quart-0.19.6

@khadanja
Copy link
Author

khadanja commented Nov 14, 2024

@TheCaduceus Fixed by adding this to requirements.txt flask==3.0.3 Quart downgrade not required.
pallets/quart#371

@TheCaduceus
Copy link
Owner

Recently, Flask released a breaking update about 12 hours ago, and since Quart uses Flask without locking its version, this caused an issue (pallets/quart#371) in Quart for everyone. For now, I have manually locked all dependency versions to resolve the issue.

You can update your requirements.txt file's content with this and do:
1.pip uninstall -r requirements.txt
2.pip install -r requirements.txt

@khadanja

@khadanja
Copy link
Author

Thanks @TheCaduceus I created a PR but looks like you've updated already, will close my PR. Thanks

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

No branches or pull requests

2 participants