用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