TheCaduceus / Microsoft-E5-Auto-Renewal

An open-source Python program made using Quart & Uvicorn for automatic renewal of Microsoft's Developer E5 subscription.
https://e5.thecaduceus.eu.org
165 stars 106 forks source link

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

Closed khadanja closed 10 hours ago

khadanja commented 12 hours ago

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 commented 11 hours ago

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 commented 11 hours ago

@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 commented 10 hours ago

@TheCaduceus Fixed by adding this to requirements.txt flask==3.0.3 Quart downgrade not required. https://github.com/pallets/quart/issues/371

TheCaduceus commented 10 hours ago

Recently, Flask released a breaking update about 12 hours ago, and since Quart uses Flask without locking its version, this caused an issue (https://github.com/pallets/quart/issues/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 commented 10 hours ago

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