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

Fix ValidationError that occurred when requesting file information for specific video files #253

Merged
merged 2 commits into from
Sep 4, 2023

Conversation

evgkirov
Copy link
Collaborator

@evgkirov evgkirov commented Sep 1, 2023

API spec says that these fields are nullable, but pyuploadcare expected them to have values:

  • VideoStreamInfo#bitrate
  • VideoStreamInfo#codec
  • VideoInfo#duration
  • VideoInfo#bitrate

That sometimes led to errors like this:

pydantic.error_wrappers.ValidationError: 1 validation error for ParsingModel[FileListResponse]
__root__ -> results -> 79 -> content_info -> video -> video -> 0 -> bitrate
none is not an allowed value (type=type_error.none.not_allowed)

…ideoInfo#bitrate are now Optional[] as denoted in API spec
@evgkirov evgkirov merged commit a1f0b85 into main Sep 4, 2023
32 checks passed
@rsedykh rsedykh deleted the bugfix/ucare_sync_validationerror branch January 26, 2024 06:15
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

Successfully merging this pull request may close these issues.

2 participants