Open DjangoPeng opened 1 year ago
@logankilpatrick PTAL
Simply cloning, installing dependencies and running python main.py
fails.
Pinning dependencies may make this more stable.
(gpt-plugins) ➜ plugins-quickstart git:(main) python main.py
Traceback (most recent call last):
File "/Users/rees/plugins-quickstart/main.py", line 4, in <module>
import quart_cors
File "/Users/rees/mambaforge/envs/gpt-plugins/lib/python3.11/site-packages/quart_cors/__init__.py", line 6, in <module>
from quart.datastructures import HeaderSet, RequestAccessControl
ImportError: cannot import name 'HeaderSet' from 'quart.datastructures' (/Users/rees/mambaforge/envs/gpt-plugins/lib/python3.11/site-packages/quart/datastructures.py)
(gpt-plugins) ➜ plugins-quickstart git:(main) mamba list quart
# packages in environment at /Users/rees/mambaforge/envs/gpt-plugins:
#
# Name Version Build Channel
quart 0.18.3 pyhd8ed1ab_0 conda-forge
quart-cors 0.2.0 py_0 conda-forge
@WiscEvan
How about taking a look at #30
I gave your code a try as well and this still resulted in the error.
The error seems to be a result of using quart-cors 0.2.0
rather than quart-cors 0.6.0
The code ran without any issues with these versions:
# packages in environment at /Users/rees/mambaforge/envs/gpt-plugins:
#
# Name Version Build Channel
quart 0.18.4 pypi_0 pypi
quart-cors 0.6.0 pypi_0 pypi
The conda-forge
channel for quart-cors
appears to be out of date. This was resolved by installing with pip
rather than mamba
The quart-cors
conda-forge package should be bumped from 0.2.0 to the latest version to install using the conda package manager. Otherwise, installation should be performed using pypi
I see.
Thanks for your explanation.
Let me update the PR( https://github.com/openai/plugins-quickstart/pull/30) to specify version of quart-cors
Environment Information:
Current Situation:
The versions are unspecific, leading to issues with Quart and Quart-CORS APIs when used. For instance:
Changing all @app HTTP method calls to this style:
@app.route("/todos/<string:username>", methods=["POST"])
allows successful execution of main.py.
However, it's unable to load the sample project "TODO Plugin (no auth)" at https://chat.openai.com/ and the following error is displayed:
This issue seems to be related to the versioning of Quart and Quart-CORS. Can we specify the versions in the requirements to prevent these issues?