Python अपवादएरर
ConnectionAbortedErrorConnectionAbortedError
Connection को स्थानीय मशीन द्वारा रद्द कर दिया गया।
python
विवरण देखें FileNotFoundErrorनिर्दिष्ट file या directory मौजूद नहीं है।
File path किसी existing file की ओर संकेत नहीं करता। सामान्य कारण: path में typo, गलत working directory, अनपेक्षित स्थान से resolve होते relative paths, या file का delete या move होना।
os.path.exists() से file की जाँच करें। Reliable path construction के लिए absolute paths या os.path.join() उपयोग करें। os.getcwd() से working directory जाँचें। Path resolution debugging के लिए पूरा path print करें।
open("/nonexistent/file.txt") # FileNotFoundErrorConnectionAbortedErrorConnection को स्थानीय मशीन द्वारा रद्द कर दिया गया।
RecursionErrorअधिकतम recursion गहराई पार हो गई।
MemoryErrorPython इंटरप्रेटर में उपलब्ध मेमोरी समाप्त हो गई।
IsADirectoryErrorकिसी directory वाले path पर file operation का प्रयास किया गया।
FileExistsErrorOperation विफल हुई क्योंकि file या directory पहले से मौजूद है।
TypeErrorकिसी ऑपरेशन या फ़ंक्शन को अनुपयुक्त प्रकार के ऑब्जेक्ट पर लागू किया गया।