IndentationErrorIndentationError
Code में गलत indentation है, जो Python में वाक्य-रचनात्मक रूप से महत्वपूर्ण है।
TypeErrorकिसी ऑपरेशन या फ़ंक्शन को अनुपयुक्त प्रकार के ऑब्जेक्ट पर लागू किया गया।
आपने असंगत types पर ऑपरेशन किया, जैसे string को integer में जोड़ना, non-callable ऑब्जेक्ट को call करना, गलत argument types पास करना, या ऐसे ऑब्जेक्ट का उपयोग करना जो आवश्यक protocol (iteration, indexing आदि) को support नहीं करता।
`type()` से अपने variables के types जाँचें। Types स्पष्ट रूप से convert करें: `str()`, `int()`, `float()`, `list()`। Type checking के लिए `isinstance()` उपयोग करें। Error message ध्यान से पढ़ें; यह आमतौर पर बताता है कि कौन से types असंगत हैं।
"hello" + 5 # TypeError: can only concatenate str to strIndentationErrorCode में गलत indentation है, जो Python में वाक्य-रचनात्मक रूप से महत्वपूर्ण है।
KeyboardInterruptउपयोगकर्ता ने चल रहे प्रोग्राम को बाधित करने के लिए Ctrl+C दबाया।
re.errorregular expression pattern में अमान्य syntax है।
LookupErrorउन त्रुटियों की base class जब key या index नहीं मिलती (KeyError, IndexError)।
NameErrorकिसी ऐसे local या global नाम को संदर्भित किया गया जो परिभाषित नहीं है।
FileExistsErrorOperation विफल हुई क्योंकि file या directory पहले से मौजूद है।