python error整理(不定時更新)

2022-01-14 18:20:56 字數 878 閱讀 9615

1.taberror: inconsistent use of tabs and spaces in indentation

python 中需要用tab 鍵來空格

2.syntaxerror: invalid character in identifier

中英文沒有切換好

3.taberror: inconsistent use of tabs and spaces in indentation

空格問題;;

4.name.login_attempts()

typeerror: 'int' object is not callable

呼叫int時出錯:需要重新定義變數名

5. indentationerror: expected an indented block

在定義類之後沒有再定義了

6. super().__init__(make, module, year)

typeerror: object.__init__() takes no arguments

繼承error

class electriccar(car)括號內的car沒有寫,所以出現了takes no arguments 的錯誤。

7. indentationerror: unexpected indent

沒有縮排,把空格去掉。

8.syntaxerror: invalid character in identifier, 

一直找不到問題點的話,請確保**行內沒有夾雜中文的空格,tab等,非文字字元

9. can't find '__main__' module in ''

沒有先儲存,我是在sublime text中執行的,忘記先儲存再執行,因此報了這樣的錯

linux 不定期整理

改變檔案所有人 chown username filename r檢視埠占用 netstat tunlp檢視資源占用 top使用zip壓縮資料夾 zip r file.zip file檢視儲存占用比例 df 檢視當前資料夾下的各個檔案占用磁碟空間 du ah max depth 1檢視核心版本 un...

ps筆記(不定時整理)

列印 300ppi 網頁 72ppi 掃瞄底片 1000ppi 影象由乙個個畫素點組成,圖形 向量 不是。怎麼影象解析度壓得很低 再拉大 不變形?操作步驟 圖層 智慧型物件 轉化為智慧型物件 表面是個圖層,實際上是個縮放不會變形的近似於向量的東西 改回去操作步驟 智慧型物件 柵格化 180 8 30...

Unity開源專案整理(長期整理 不定期更新)

此篇用於整理一些感興趣的開源專案,好的開源專案非常多,但是為了保持簡潔,不感興趣的不再此列。專案名稱 最低版本 技術型別 備註dotssample unity 2019.3 dots hdrp unity animation unity physics dots a 尋路 unity 2019.3 ...