python TypeError: write() argument must be str, not bytes 解决方法

NoSuchKey