uploadcare / pyuploadcare

Build file handling in minutes. Upload or accept user-generated content, store, transform, optimize, and deliver images, videos, and documents to billions of users.
https://uploadcare.com/
MIT License
127 stars 31 forks source link

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

Closed evgkirov closed 1 year ago

evgkirov commented 1 year ago

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

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)