用python黑框运行程序写入文件时闪退,或一行行运行到写入时提示8170数字。python
经试验,为文件路径错误致使。spa
with open("1.doc", "wb") as file: file.write(response.read())
改成:code
with open("C:\\Users\\用户名\\Desktop\\1.doc", "wb") as file: file.write(response.read())
写入文件便可成功。blog
但写入仍是会提示8170的数字,不知为什么。it