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

Issue with parsing model "Site" #19

Open
alexmarginean16 opened this issue Jun 2, 2024 · 2 comments
Open

Issue with parsing model "Site" #19

alexmarginean16 opened this issue Jun 2, 2024 · 2 comments

Comments

@alexmarginean16
Copy link

I'm running into an issue when I try to query the API through this SDK to get a list of the sites associated with the current access code.

client = Webflow(access_token=session['access_token'])
sites = client.sites.list()

This is the exception that gets thrown:

pydantic.v1.error_wrappers.ValidationError: 1 validation error for ParsingModel[Site]
__root__ -> id
    field required (type=value_error.missing)

I am not very familiar with pydantic but it seems that it's failing at parsing the id of a site, but surely the API returns IDs for each site in JSON.

@alexmarginean16
Copy link
Author

alexmarginean16 commented Jun 2, 2024

I have edited the list() function to return just the raw JSON response and the response does include an id field. Really not sure why this issue is happening.

Screenshot 2024-06-02 at 2 03 50 AM Screenshot 2024-06-02 at 2 05 06 AM

@stuartbgreen
Copy link

+1

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