type error str/buffer