Python अपवादएरर
IndentationErrorIndentationError
Code में गलत indentation है, जो Python में वाक्य-रचनात्मक रूप से महत्वपूर्ण है।
python
विवरण देखें TypeError: object is not subscriptableकिसी ऐसे object पर bracket notation ([]) उपयोग किया गया जो indexing support नहीं करता।
आपने ऐसे object पर bracket notation उपयोग किया जो __getitem__ implement नहीं करता। यह सामान्यतः तब होता है जब variable None, integer, या कोई अन्य type हो जो indexing support नहीं करती।
indexing से पहले object का type जांचें। None check जोड़ें: if obj is not None: obj[0]। verify करें कि variable expected type है (list, dict, string)। इन errors को जल्दी पकड़ने के लिए type hints और type checker उपयोग करें।
None[0] # TypeError: 'NoneType' object is not subscriptableIndentationErrorCode में गलत indentation है, जो Python में वाक्य-रचनात्मक रूप से महत्वपूर्ण है।
ChildProcessErrorchild process ऑपरेशन विफल हुआ।
TimeoutErrorblocking ऑपरेशन के दौरान सिस्टम-स्तर timeout हुआ।
AttributeErrorकिसी ऑब्जेक्ट में अनुरोधित attribute या method नहीं है।
IsADirectoryErrorकिसी directory वाले path पर file operation का प्रयास किया गया।
pickle.UnpicklingErrorpickle module प्रदान किए गए डेटा को deserialize नहीं कर सका।