Closed faheel closed 6 years ago
I have the following types declared:
class Uploader(types.Type): channel_id = validators.String(title='ID') name = validators.String(title='Name') thumbnail_url = validators.String(title='Thumbnail URL') is_verified = validators.Boolean(title='Verified') class Statistics(types.Type): views = validators.Integer(title='Views') likes = validators.Integer(title='Likes') dislikes = validators.Integer(title='Dislikes') class Video(types.Type): video_id = validators.String(title='ID') title = validators.String(title='Title') upload_date = validators.String(title='Upload date', format='date') duration = validators.String(title='Duration') description = validators.String(title='Description') thumbnail_url = validators.String(title='Thumbnail URL') genre = validators.String(title='Genre') is_paid = validators.Boolean(title='Paid') is_unlisted = validators.Boolean(title='Unlisted') is_family_friendly = validators.Boolean(title='Family-friendly') uploader = Uploader statistics = Statistics
I have a Video object named video, and after setting all its values, when I return a http.JSONResponse containing it:
Video
video
http.JSONResponse
return http.JSONResponse(video)
I get the following error:
RecursionError: maximum recursion depth exceeded in comparison
which probably occurs when video is internally being encoded to JSON:
Closed via #571. Release coming shortly.
I have the following types declared:
I have a
Video
object namedvideo
, and after setting all its values, when I return ahttp.JSONResponse
containing it:I get the following error:
which probably occurs when
video
is internally being encoded to JSON: