TypeError encountered: not a string