How to fix Input should be a valid string [type=string_type] in Python | DevErrors