Alternative forms: EnvironmentError · IOError · WindowsError
What does this code mean?
Code OSError · An issue reported by Python.
Official explanation · Original text
This exception is raised when a system function returns a system-related error, including I/O failures such as “file not found” or “disk full” (not for illegal argument types or other incidental errors).
The second form of the constructor sets the corresponding attributes, described below. The attributes default to None if not specified. For backwards compatibility, if three arguments are passed, the args attribute contains only a 2-tuple of the first two constructor arguments.
The constructor often actually returns a subclass of OSError, as described in OS exceptions below. The particular subclass depends on the final errno value. This behaviour only occurs when constructing OSError directly or via an alias, and is not inherited when subclassing.
Troubleshooting and diagnostic links
First check that the document's product, version, and environment match your situation.
Modifications: English prose extracted; whitespace normalized; Korean context and classified official links added. Python code examples not redistributed.