sublime :[Decode error - output not utf-8]
生活随笔
收集整理的這篇文章主要介紹了
sublime :[Decode error - output not utf-8]
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
點擊運行出錯提示:[Decode error - output not utf-8]
這幾天出現此問題有幾種情況,在加了編碼為utf-8時,通常是語法錯誤:
(1)tab鍵和空格鍵混合
選中一行,可以看到行前面空的是點還是線,如果發現既有線又有點,估計就是這問題了,導致縮進不一致
解決方法:設置將tab鍵自動換為4個空格鍵
點擊 Preference -> Settings-User,添加:
// Set to true to insert spaces when tab is pressed "translate_tabs_to_spaces": true(2)import錯誤
(3)字典鍵值數字和字符混了
很惡心,sublime中運行python,當有語法錯誤時,很多時候沒有提示,這個時候就要小心了……
總結
以上是生活随笔為你收集整理的sublime :[Decode error - output not utf-8]的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: getline读取不等待输入的问题
- 下一篇: Mysql事务处理问题