├── LICENSE ├── README.md ├── error_handling.js └── error_handling.json /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 anandpatel 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /error_handling.js: -------------------------------------------------------------------------------- 1 | 2 | var express = require('express'); 3 | var app = express(); 4 | var fs = require("fs"); 5 | var bodyParser = require("body-parser") 6 | 7 | 8 | var d = new Date; 9 | var dd = d.getDate; 10 | var mm = d.getMonth; 11 | var yy = d.getFullYear; 12 | 13 | var todayDate = dd.toString() + "-" + mm.toString() + "-" + yy.toString(); 14 | 15 | app.use(express.json()) 16 | 17 | app.get('/all_errors', function(req, res){ 18 | fs.readFile( __dirname + "/error_handling.json", (err, data)=>{ 19 | if (err){ 20 | return res.json({"errorMsg":"check your json file"}) 21 | }else{ 22 | var mydata = JSON.parse(data); 23 | // return res.json(mydata["satyam18@navgurukul.org"]["python"]) 24 | // console.log(mydata) 25 | return res.send(mydata); 26 | } 27 | }) 28 | }) 29 | 30 | 31 | app.get('/all_errors/:language', function(req, res){ 32 | var language = req.params.language 33 | // console.log(language); 34 | 35 | fs.readFile( __dirname + "/error_handling.json", (err, data)=>{ 36 | if(err){ 37 | return res.json({"errorMsg":"check your json file"}) 38 | }else{ 39 | var data1 = JSON.parse(data); 40 | return res.json(data1[req.params.language]) 41 | } 42 | }) 43 | }) 44 | 45 | 46 | app.get('/all_errors/:language/:errorname', function(req, res){ 47 | var errorname = req.params.errorname; 48 | fs.readFile(__dirname + "/error_handling.json", (err, data)=>{ 49 | console.log(req.params.errorname) 50 | if (err){ 51 | return res.json({"errorMsg":"check your json file"}) 52 | }else{ 53 | var mydata = JSON.parse(data); 54 | if (mydata.errorname == mydata.python[0]){ 55 | // console.log(mydata.python[0]); 56 | } 57 | return res.json(mydata.python[0]) 58 | } 59 | }) 60 | }) 61 | 62 | 63 | app.put('/all_errors/:language/:errorname', function(req, res){ 64 | var errorDict = req.body; 65 | fs.readFile(__dirname + "/error_handling.json", (err, data)=>{ 66 | if(err){ 67 | return res.json({"errorMsg":"check your json file"}) 68 | }else{ 69 | var data = JSON.parse(data); 70 | for (var i of data[req.params.language]){ 71 | if(i['errorName'] == req.params.errorname){ 72 | if(i.hasOwnProperty('example')){ 73 | i['example'] = req.body['example']; 74 | } 75 | if(i.hasOwnProperty('url')){ 76 | i['url'] = req.body['url'] 77 | } 78 | break 79 | } 80 | } 81 | } 82 | var mydata = JSON.stringify(data,null,2) 83 | fs.writeFile(__dirname + "/error_handling.json",mydata,(err, data)=>{ 84 | return res.json(i) 85 | }); 86 | }); 87 | }) 88 | 89 | 90 | 91 | app.post('/:emailid/:errName',(req,res)=>{ 92 | var errname=req.params.errName 93 | var emailId=req.params.emailid 94 | var newuser={} 95 | var data=fs.readFileSync(__dirname + "/error_handling.json") 96 | data=data.toString(); 97 | var course = JSON.parse(data) 98 | if(course.hasOwnProperty(emailId)){ 99 | return res.json(course[emailId]["python"][errname]["description"]) 100 | }else{ 101 | course[req.params.emailid]=course["satyam18@navgurukul.org"] 102 | console.log(course) 103 | fs.writeFileSync('users.json',JSON.stringify(course,null,2)) 104 | return res.json(course[emailId]["python"][errname]["description"]) 105 | } 106 | 107 | }); 108 | 109 | 110 | var server = app.listen(5051, function(){ 111 | var host = server.address().address 112 | var port = server.address().port 113 | console.log("server is running port...") 114 | console.log(host,port) 115 | }) 116 | -------------------------------------------------------------------------------- /error_handling.json: -------------------------------------------------------------------------------- 1 | { 2 | "python": [ 3 | { 4 | "description": "The base class for all built-in exceptions. It is not meant to be directly\ninherited by user-defined classes (for that, use Exception). If\nstr() is called on an instance of this class, the representation of\nthe argument(s) to the instance are returned, or the empty string when\nthere were no arguments.\n\n\nargs¶\nThe tuple of arguments given to the exception constructor. Some built-in\nexceptions (like OSError) expect a certain number of arguments and\nassign a special meaning to the elements of this tuple, while others are\nusually called only with a single string giving an error message.\n\n\n\nwith_traceback(tb)¶\nThis method sets tb as the new traceback for the exception and returns\nthe exception object. It is usually used in exception handling code like\nthis:\ntry:\n ...\nexcept SomeException:\n tb = sys.exc_info()[2]\n raise OtherException(...).with_traceback(tb)", 5 | "errorName": "BaseException", 6 | "example": "", 7 | "id": 1 8 | }, 9 | { 10 | "description": "The tuple of arguments given to the exception constructor. Some built-in\nexceptions (like OSError) expect a certain number of arguments and\nassign a special meaning to the elements of this tuple, while others are\nusually called only with a single string giving an error message.", 11 | "errorName": "args", 12 | "example": "Hi I am Anand", 13 | "id": 2 14 | }, 15 | { 16 | "description": "This method sets tb as the new traceback for the exception and returns\nthe exception object. It is usually used in exception handling code like\nthis:\ntry:\n ...\nexcept SomeException:\n tb = sys.exc_info()[2]\n raise OtherException(...).with_traceback(tb)", 17 | "errorName": "with_traceback", 18 | "example": "", 19 | "id": 3 20 | }, 21 | { 22 | "description": "All built-in, non-system-exiting exceptions are derived from this class. All\nuser-defined exceptions should also be derived from this class.", 23 | "errorName": "Exception", 24 | "example": "", 25 | "id": 4 26 | }, 27 | { 28 | "description": "The base class for those built-in exceptions that are raised for various\narithmetic errors: OverflowError, ZeroDivisionError,\nFloatingPointError.", 29 | "errorName": "ArithmeticError", 30 | "example": "", 31 | "id": 5 32 | }, 33 | { 34 | "description": "Raised when a buffer related operation cannot be\nperformed.", 35 | "errorName": "BufferError", 36 | "example": "", 37 | "id": 6 38 | }, 39 | { 40 | "description": "The base class for the exceptions that are raised when a key or index used on\na mapping or sequence is invalid: IndexError, KeyError. This\ncan be raised directly by codecs.lookup().", 41 | "errorName": "LookupError", 42 | "example": "", 43 | "id": 7 44 | }, 45 | { 46 | "description": "Raised when an assert statement fails.", 47 | "errorName": "AssertionError", 48 | "id": 8 49 | }, 50 | { 51 | "description": "Raised when an attribute reference (see Attribute references) or\nassignment fails. (When an object does not support attribute references or\nattribute assignments at all, TypeError is raised.)", 52 | "errorName": "AttributeError", 53 | "example": "", 54 | "id": 9 55 | }, 56 | { 57 | "description": "Raised when the input() function hits an end-of-file condition (EOF)\nwithout reading any data. (N.B.: the io.IOBase.read() and\nio.IOBase.readline() methods return an empty string when they hit EOF.)", 58 | "errorName": "EOFError", 59 | "example": "", 60 | "id": 10 61 | }, 62 | { 63 | "description": "Not currently used.", 64 | "errorName": "FloatingPointError", 65 | "example": "", 66 | "id": 11 67 | }, 68 | { 69 | "description": "Raised when a generator or coroutine is closed;\nsee generator.close() and coroutine.close(). It\ndirectly inherits from BaseException instead of Exception since\nit is technically not an error.", 70 | "errorName": "GeneratorExit", 71 | "example": "", 72 | "id": 12 73 | }, 74 | { 75 | "description": "Raised when the import statement has troubles trying to\nload a module. Also raised when the “from list” in from ... import\nhas a name that cannot be found.\nThe name and path attributes can be set using keyword-only\narguments to the constructor. When set they represent the name of the module\nthat was attempted to be imported and the path to any file which triggered\nthe exception, respectively.\n\nChanged in version 3.3: Added the name and path attributes.", 76 | "errorName": "ImportError", 77 | "example": "", 78 | "id": 13 79 | }, 80 | { 81 | "description": "A subclass of ImportError which is raised by import\nwhen a module could not be located. It is also raised when None\nis found in sys.modules.\n\nNew in version 3.6.", 82 | "errorName": "ModuleNotFoundError", 83 | "example": "", 84 | "id": 14 85 | }, 86 | { 87 | "description": "Raised when a sequence subscript is out of range. (Slice indices are\nsilently truncated to fall in the allowed range; if an index is not an\ninteger, TypeError is raised.)", 88 | "errorName": "IndexError", 89 | "example": "", 90 | "id": 15 91 | }, 92 | { 93 | "description": "Raised when a mapping (dictionary) key is not found in the set of existing keys.", 94 | "errorName": "KeyError", 95 | "example": "", 96 | "id": 16 97 | }, 98 | { 99 | "description": "Raised when the user hits the interrupt key (normally Control-C or\nDelete). During execution, a check for interrupts is made\nregularly. The exception inherits from BaseException so as to not be\naccidentally caught by code that catches Exception and thus prevent\nthe interpreter from exiting.", 100 | "errorName": "KeyboardInterrupt", 101 | "example": "", 102 | "id": 17 103 | }, 104 | { 105 | "description": "Raised when an operation runs out of memory but the situation may still be\nrescued (by deleting some objects). The associated value is a string indicating\nwhat kind of (internal) operation ran out of memory. Note that because of the\nunderlying memory management architecture (C’s malloc() function), the\ninterpreter may not always be able to completely recover from this situation; it\nnevertheless raises an exception so that a stack traceback can be printed, in\ncase a run-away program was the cause.", 106 | "errorName": "MemoryError", 107 | "example": "", 108 | "id": 18 109 | }, 110 | { 111 | "description": "Raised when a local or global name is not found. This applies only to\nunqualified names. The associated value is an error message that includes the\nname that could not be found.", 112 | "errorName": "NameError", 113 | "example": "", 114 | "id": 19 115 | }, 116 | { 117 | "description": "This exception is derived from RuntimeError. In user defined base\nclasses, abstract methods should raise this exception when they require\nderived classes to override the method, or while the class is being\ndeveloped to indicate that the real implementation still needs to be added.\n\nNote\nIt should not be used to indicate that an operator or method is not\nmeant to be supported at all – in that case either leave the operator /\nmethod undefined or, if a subclass, set it to None.\n\n\nNote\nNotImplementedError and NotImplemented are not interchangeable,\neven though they have similar names and purposes. See\nNotImplemented for details on when to use it.", 118 | "errorName": "NotImplementedError", 119 | "example": "", 120 | "id": 20 121 | }, 122 | { 123 | "description": "This exception is raised when a system function returns a system-related\nerror, including I/O failures such as “file not found” or “disk full”\n(not for illegal argument types or other incidental errors).\nThe second form of the constructor sets the corresponding attributes,\ndescribed below. The attributes default to None if not\nspecified. For backwards compatibility, if three arguments are passed,\nthe args attribute contains only a 2-tuple\nof the first two constructor arguments.\nThe constructor often actually returns a subclass of OSError, as\ndescribed in OS exceptions below. The particular subclass depends on\nthe final errno value. This behaviour only occurs when\nconstructing OSError directly or via an alias, and is not\ninherited when subclassing.\n\n\nerrno¶\nA numeric error code from the C variable errno.\n\n\n\nwinerror¶\nUnder Windows, this gives you the native\nWindows error code. The errno attribute is then an approximate\ntranslation, in POSIX terms, of that native error code.\nUnder Windows, if the winerror constructor argument is an integer,\nthe errno attribute is determined from the Windows error code,\nand the errno argument is ignored. On other platforms, the\nwinerror argument is ignored, and the winerror attribute\ndoes not exist.\n\n\n\nstrerror¶\nThe corresponding error message, as provided by\nthe operating system. It is formatted by the C\nfunctions perror() under POSIX, and FormatMessage()\nunder Windows.\n\n\n\nfilename¶\n\nfilename2¶\nFor exceptions that involve a file system path (such as open() or\nos.unlink()), filename is the file name passed to the function.\nFor functions that involve two file system paths (such as\nos.rename()), filename2 corresponds to the second\nfile name passed to the function.\n\n\nChanged in version 3.3: EnvironmentError, IOError, WindowsError,\nsocket.error, select.error and\nmmap.error have been merged into OSError, and the\nconstructor may return a subclass.\n\n\nChanged in version 3.4: The filename attribute is now the original file name passed to\nthe function, instead of the name encoded to or decoded from the\nfilesystem encoding. Also, the filename2 constructor argument and\nattribute was added.", 124 | "errorName": "OSError", 125 | "example": "", 126 | "id": 21 127 | }, 128 | { 129 | "description": "A numeric error code from the C variable errno.", 130 | "errorName": "errno", 131 | "example": "", 132 | "id": 22 133 | }, 134 | { 135 | "description": "Under Windows, this gives you the native\nWindows error code. The errno attribute is then an approximate\ntranslation, in POSIX terms, of that native error code.\nUnder Windows, if the winerror constructor argument is an integer,\nthe errno attribute is determined from the Windows error code,\nand the errno argument is ignored. On other platforms, the\nwinerror argument is ignored, and the winerror attribute\ndoes not exist.", 136 | "errorName": "winerror", 137 | "example": "", 138 | "id": 23 139 | }, 140 | { 141 | "description": "The corresponding error message, as provided by\nthe operating system. It is formatted by the C\nfunctions perror() under POSIX, and FormatMessage()\nunder Windows.", 142 | "errorName": "strerror", 143 | "example": "", 144 | "id": 24 145 | }, 146 | { 147 | "description": "For exceptions that involve a file system path (such as open() or\nos.unlink()), filename is the file name passed to the function.\nFor functions that involve two file system paths (such as\nos.rename()), filename2 corresponds to the second\nfile name passed to the function.", 148 | "errorName": "filename", 149 | "example": "", 150 | "id": 25 151 | }, 152 | { 153 | "description": "Raised when the result of an arithmetic operation is too large to be\nrepresented. This cannot occur for integers (which would rather raise\nMemoryError than give up). However, for historical reasons,\nOverflowError is sometimes raised for integers that are outside a required\nrange. Because of the lack of standardization of floating point exception\nhandling in C, most floating point operations are not checked.", 154 | "errorName": "OverflowError", 155 | "example": "", 156 | "id": 26 157 | }, 158 | { 159 | "description": "This exception is derived from RuntimeError. It is raised when the\ninterpreter detects that the maximum recursion depth (see\nsys.getrecursionlimit()) is exceeded.\n\nNew in version 3.5: Previously, a plain RuntimeError was raised.", 160 | "errorName": "RecursionError", 161 | "example": "", 162 | "id": 27 163 | }, 164 | { 165 | "description": "This exception is raised when a weak reference proxy, created by the\nweakref.proxy() function, is used to access an attribute of the referent\nafter it has been garbage collected. For more information on weak references,\nsee the weakref module.", 166 | "errorName": "ReferenceError", 167 | "example": "", 168 | "id": 28 169 | }, 170 | { 171 | "description": "Raised when an error is detected that doesn’t fall in any of the other\ncategories. The associated value is a string indicating what precisely went\nwrong.", 172 | "errorName": "RuntimeError", 173 | "example": "", 174 | "id": 29 175 | }, 176 | { 177 | "description": "Raised by built-in function next() and an iterator’s\n__next__() method to signal that there are no further\nitems produced by the iterator.\nThe exception object has a single attribute value, which is\ngiven as an argument when constructing the exception, and defaults\nto None.\nWhen a generator or coroutine function\nreturns, a new StopIteration instance is\nraised, and the value returned by the function is used as the\nvalue parameter to the constructor of the exception.\nIf a generator code directly or indirectly raises StopIteration,\nit is converted into a RuntimeError (retaining the\nStopIteration as the new exception’s cause).\n\nChanged in version 3.3: Added value attribute and the ability for generator functions to\nuse it to return a value.\n\n\nChanged in version 3.5: Introduced the RuntimeError transformation via\nfrom __future__ import generator_stop, see PEP 479.\n\n\nChanged in version 3.7: Enable PEP 479 for all code by default: a StopIteration\nerror raised in a generator is transformed into a RuntimeError.", 178 | "errorName": "StopIteration", 179 | "example": "", 180 | "id": 30 181 | }, 182 | { 183 | "description": "Must be raised by __anext__() method of an\nasynchronous iterator object to stop the iteration.\n\nNew in version 3.5.", 184 | "errorName": "StopAsyncIteration", 185 | "example": "", 186 | "id": 31 187 | }, 188 | { 189 | "description": "Raised when the parser encounters a syntax error. This may occur in an\nimport statement, in a call to the built-in functions exec()\nor eval(), or when reading the initial script or standard input\n(also interactively).\nInstances of this class have attributes filename, lineno,\noffset and text for easier access to the details. str()\nof the exception instance returns only the message.", 190 | "errorName": "SyntaxError", 191 | "id": 32 192 | }, 193 | { 194 | "description": "Base class for syntax errors related to incorrect indentation. This is a\nsubclass of SyntaxError.", 195 | "errorName": "IndentationError", 196 | "example": "", 197 | "id": 33 198 | }, 199 | { 200 | "description": "Raised when indentation contains an inconsistent use of tabs and spaces.\nThis is a subclass of IndentationError.", 201 | "errorName": "TabError", 202 | "example": "", 203 | "id": 34 204 | }, 205 | { 206 | "description": "Raised when the interpreter finds an internal error, but the situation does not\nlook so serious to cause it to abandon all hope. The associated value is a\nstring indicating what went wrong (in low-level terms).\nYou should report this to the author or maintainer of your Python interpreter.\nBe sure to report the version of the Python interpreter (sys.version; it is\nalso printed at the start of an interactive Python session), the exact error\nmessage (the exception’s associated value) and if possible the source of the\nprogram that triggered the error.", 207 | "errorName": "SystemError", 208 | "example": "", 209 | "id": 35 210 | }, 211 | { 212 | "description": "This exception is raised by the sys.exit() function. It inherits from\nBaseException instead of Exception so that it is not accidentally\ncaught by code that catches Exception. This allows the exception to\nproperly propagate up and cause the interpreter to exit. When it is not\nhandled, the Python interpreter exits; no stack traceback is printed. The\nconstructor accepts the same optional argument passed to sys.exit().\nIf the value is an integer, it specifies the system exit status (passed to\nC’s exit() function); if it is None, the exit status is zero; if\nit has another type (such as a string), the object’s value is printed and\nthe exit status is one.\nA call to sys.exit() is translated into an exception so that clean-up\nhandlers (finally clauses of try statements) can be\nexecuted, and so that a debugger can execute a script without running the risk\nof losing control. The os._exit() function can be used if it is\nabsolutely positively necessary to exit immediately (for example, in the child\nprocess after a call to os.fork()).\n\n\ncode¶\nThe exit status or error message that is passed to the constructor.\n(Defaults to None.)", 213 | "errorName": "SystemExit", 214 | "example": "", 215 | "id": 36 216 | }, 217 | { 218 | "description": "The exit status or error message that is passed to the constructor.\n(Defaults to None.)", 219 | "errorName": "code", 220 | "example": "", 221 | "id": 37 222 | }, 223 | { 224 | "description": "Raised when an operation or function is applied to an object of inappropriate\ntype. The associated value is a string giving details about the type mismatch.\nThis exception may be raised by user code to indicate that an attempted\noperation on an object is not supported, and is not meant to be. If an object\nis meant to support a given operation but has not yet provided an\nimplementation, NotImplementedError is the proper exception to raise.\nPassing arguments of the wrong type (e.g. passing a list when an\nint is expected) should result in a TypeError, but passing\narguments with the wrong value (e.g. a number outside expected boundaries)\nshould result in a ValueError.", 225 | "errorName": "TypeError", 226 | "example": "", 227 | "id": 38 228 | }, 229 | { 230 | "description": "Raised when a reference is made to a local variable in a function or method, but\nno value has been bound to that variable. This is a subclass of\nNameError.", 231 | "errorName": "UnboundLocalError", 232 | "example": "", 233 | "id": 39 234 | }, 235 | { 236 | "description": "Raised when a Unicode-related encoding or decoding error occurs. It is a\nsubclass of ValueError.\nUnicodeError has attributes that describe the encoding or decoding\nerror. For example, err.object[err.start:err.end] gives the particular\ninvalid input that the codec failed on.\n\n\nencoding¶\nThe name of the encoding that raised the error.\n\n\n\nreason¶\nA string describing the specific codec error.\n\n\n\nobject¶\nThe object the codec was attempting to encode or decode.\n\n\n\nstart¶\nThe first index of invalid data in object.\n\n\n\nend¶\nThe index after the last invalid data in object.", 237 | "errorName": "UnicodeError", 238 | "example": "", 239 | "id": 40 240 | }, 241 | { 242 | "description": "The name of the encoding that raised the error.", 243 | "errorName": "encoding", 244 | "example": "", 245 | "id": 41 246 | }, 247 | { 248 | "description": "A string describing the specific codec error.", 249 | "errorName": "reason", 250 | "example": "", 251 | "id": 42 252 | }, 253 | { 254 | "description": "The object the codec was attempting to encode or decode.", 255 | "errorName": "object", 256 | "example": "", 257 | "id": 43 258 | }, 259 | { 260 | "description": "The first index of invalid data in object.", 261 | "errorName": "start", 262 | "example": "", 263 | "id": 44 264 | }, 265 | { 266 | "description": "The index after the last invalid data in object.", 267 | "errorName": "end", 268 | "example": "", 269 | "id": 45 270 | }, 271 | { 272 | "description": "Raised when a Unicode-related error occurs during encoding. It is a subclass of\nUnicodeError.", 273 | "errorName": "UnicodeEncodeError", 274 | "example": "", 275 | "id": 46 276 | }, 277 | { 278 | "description": "Raised when a Unicode-related error occurs during decoding. It is a subclass of\nUnicodeError.", 279 | "errorName": "UnicodeDecodeError", 280 | "example": "", 281 | "id": 47 282 | }, 283 | { 284 | "description": "Raised when a Unicode-related error occurs during translating. It is a subclass\nof UnicodeError.", 285 | "errorName": "UnicodeTranslateError", 286 | "example": "", 287 | "id": 48 288 | }, 289 | { 290 | "description": "Raised when an operation or function receives an argument that has the\nright type but an inappropriate value, and the situation is not described by a\nmore precise exception such as IndexError.", 291 | "errorName": "ValueError", 292 | "example": "", 293 | "id": 49 294 | }, 295 | { 296 | "description": "Raised when the second argument of a division or modulo operation is zero. The\nassociated value is a string indicating the type of the operands and the\noperation.", 297 | "errorName": "ZeroDivisionError", 298 | "example": "", 299 | "id": 50 300 | }, 301 | { 302 | "description": "", 303 | "errorName": "EnvironmentError", 304 | "example": "", 305 | "id": 51 306 | }, 307 | { 308 | "description": "", 309 | "errorName": "IOError", 310 | "example": "", 311 | "id": 52 312 | }, 313 | { 314 | "description": "Only available on Windows.", 315 | "errorName": "WindowsError", 316 | "example": "", 317 | "id": 53 318 | }, 319 | { 320 | "description": "Raised when an operation would block on an object (e.g. socket) set\nfor non-blocking operation.\nCorresponds to errno EAGAIN, EALREADY,\nEWOULDBLOCK and EINPROGRESS.\nIn addition to those of OSError, BlockingIOError can have\none more attribute:\n\n\ncharacters_written¶\nAn integer containing the number of characters written to the stream\nbefore it blocked. This attribute is available when using the\nbuffered I/O classes from the io module.", 321 | "errorName": "BlockingIOError", 322 | "example": "", 323 | "id": 54 324 | }, 325 | { 326 | "description": "An integer containing the number of characters written to the stream\nbefore it blocked. This attribute is available when using the\nbuffered I/O classes from the io module.", 327 | "errorName": "characters_written", 328 | "example": "", 329 | "id": 55 330 | }, 331 | { 332 | "description": "Raised when an operation on a child process failed.\nCorresponds to errno ECHILD.", 333 | "errorName": "ChildProcessError", 334 | "example": "", 335 | "id": 56 336 | }, 337 | { 338 | "description": "A base class for connection-related issues.\nSubclasses are BrokenPipeError, ConnectionAbortedError,\nConnectionRefusedError and ConnectionResetError.", 339 | "errorName": "ConnectionError", 340 | "example": "", 341 | "id": 57 342 | }, 343 | { 344 | "description": "A subclass of ConnectionError, raised when trying to write on a\npipe while the other end has been closed, or trying to write on a socket\nwhich has been shutdown for writing.\nCorresponds to errno EPIPE and ESHUTDOWN.", 345 | "errorName": "BrokenPipeError", 346 | "example": "", 347 | "id": 58 348 | }, 349 | { 350 | "description": "A subclass of ConnectionError, raised when a connection attempt\nis aborted by the peer.\nCorresponds to errno ECONNABORTED.", 351 | "errorName": "ConnectionAbortedError", 352 | "example": "", 353 | "id": 59 354 | }, 355 | { 356 | "description": "A subclass of ConnectionError, raised when a connection attempt\nis refused by the peer.\nCorresponds to errno ECONNREFUSED.", 357 | "errorName": "ConnectionRefusedError", 358 | "example": "", 359 | "id": 60 360 | }, 361 | { 362 | "description": "A subclass of ConnectionError, raised when a connection is\nreset by the peer.\nCorresponds to errno ECONNRESET.", 363 | "errorName": "ConnectionResetError", 364 | "example": "", 365 | "id": 61 366 | }, 367 | { 368 | "description": "Raised when trying to create a file or directory which already exists.\nCorresponds to errno EEXIST.", 369 | "errorName": "FileExistsError", 370 | "example": "", 371 | "id": 62 372 | }, 373 | { 374 | "description": "Raised when a file or directory is requested but doesn’t exist.\nCorresponds to errno ENOENT.", 375 | "errorName": "FileNotFoundError", 376 | "example": "", 377 | "id": 63 378 | }, 379 | { 380 | "description": "Raised when a system call is interrupted by an incoming signal.\nCorresponds to errno EINTR.\n\nChanged in version 3.5: Python now retries system calls when a syscall is interrupted by a\nsignal, except if the signal handler raises an exception (see PEP 475\nfor the rationale), instead of raising InterruptedError.", 381 | "errorName": "InterruptedError", 382 | "example": "", 383 | "id": 64 384 | }, 385 | { 386 | "description": "Raised when a file operation (such as os.remove()) is requested\non a directory.\nCorresponds to errno EISDIR.", 387 | "errorName": "IsADirectoryError", 388 | "example": "", 389 | "id": 65 390 | }, 391 | { 392 | "description": "Raised when a directory operation (such as os.listdir()) is requested\non something which is not a directory.\nCorresponds to errno ENOTDIR.", 393 | "errorName": "NotADirectoryError", 394 | "example": "", 395 | "id": 66 396 | }, 397 | { 398 | "description": "Raised when trying to run an operation without the adequate access\nrights - for example filesystem permissions.\nCorresponds to errno EACCES and EPERM.", 399 | "errorName": "PermissionError", 400 | "example": "", 401 | "id": 67 402 | }, 403 | { 404 | "description": "Raised when a given process doesn’t exist.\nCorresponds to errno ESRCH.", 405 | "errorName": "ProcessLookupError", 406 | "example": "", 407 | "id": 68 408 | }, 409 | { 410 | "description": "Raised when a system function timed out at the system level.\nCorresponds to errno ETIMEDOUT.", 411 | "errorName": "TimeoutError", 412 | "example": "", 413 | "id": 69 414 | }, 415 | { 416 | "description": "Base class for warning categories.", 417 | "errorName": "Warning", 418 | "example": "", 419 | "id": 70 420 | }, 421 | { 422 | "description": "Base class for warnings generated by user code.", 423 | "errorName": "UserWarning", 424 | "example": "", 425 | "id": 71 426 | }, 427 | { 428 | "description": "Base class for warnings about deprecated features when those warnings are\nintended for other Python developers.", 429 | "errorName": "DeprecationWarning", 430 | "example": "", 431 | "id": 72 432 | }, 433 | { 434 | "description": "Base class for warnings about features which will be deprecated in the\nfuture.", 435 | "errorName": "PendingDeprecationWarning", 436 | "example": "", 437 | "id": 73 438 | }, 439 | { 440 | "description": "Base class for warnings about dubious syntax.", 441 | "errorName": "SyntaxWarning", 442 | "example": "", 443 | "id": 74 444 | }, 445 | { 446 | "description": "Base class for warnings about dubious runtime behavior.", 447 | "errorName": "RuntimeWarning", 448 | "example": "", 449 | "id": 75 450 | }, 451 | { 452 | "description": "Base class for warnings about deprecated features when those warnings are\nintended for end users of applications that are written in Python.", 453 | "errorName": "FutureWarning", 454 | "example": "", 455 | "id": 76 456 | }, 457 | { 458 | "description": "Base class for warnings about probable mistakes in module imports.", 459 | "errorName": "ImportWarning", 460 | "example": "", 461 | "id": 77 462 | }, 463 | { 464 | "description": "Base class for warnings related to Unicode.", 465 | "errorName": "UnicodeWarning", 466 | "example": "", 467 | "id": 78 468 | }, 469 | { 470 | "description": "Base class for warnings related to bytes and bytearray.", 471 | "errorName": "BytesWarning", 472 | "example": "", 473 | "id": 79 474 | }, 475 | { 476 | "description": "Base class for warnings related to resource usage. Ignored by the default\nwarning filters.\n\nNew in version 3.2.", 477 | "errorName": "ResourceWarning", 478 | "example": "", 479 | "id": 80 480 | }, 481 | { 482 | "description": "The base class for all built-in exceptions. It is not meant to be directly\ninherited by user-defined classes (for that, use Exception). If\nstr() is called on an instance of this class, the representation of\nthe argument(s) to the instance are returned, or the empty string when\nthere were no arguments.\n\n\nargs¶\nThe tuple of arguments given to the exception constructor. Some built-in\nexceptions (like OSError) expect a certain number of arguments and\nassign a special meaning to the elements of this tuple, while others are\nusually called only with a single string giving an error message.\n\n\n\nwith_traceback(tb)¶\nThis method sets tb as the new traceback for the exception and returns\nthe exception object. It is usually used in exception handling code like\nthis:\ntry:\n ...\nexcept SomeException:\n tb = sys.exc_info()[2]\n raise OtherException(...).with_traceback(tb)", 483 | "errorName": "BaseException", 484 | "example": "", 485 | "id": 81 486 | }, 487 | { 488 | "description": "The tuple of arguments given to the exception constructor. Some built-in\nexceptions (like OSError) expect a certain number of arguments and\nassign a special meaning to the elements of this tuple, while others are\nusually called only with a single string giving an error message.", 489 | "errorName": "args", 490 | "example": "", 491 | "id": 82 492 | }, 493 | { 494 | "description": "This method sets tb as the new traceback for the exception and returns\nthe exception object. It is usually used in exception handling code like\nthis:\ntry:\n ...\nexcept SomeException:\n tb = sys.exc_info()[2]\n raise OtherException(...).with_traceback(tb)", 495 | "errorName": "with_traceback", 496 | "example": "", 497 | "id": 83 498 | }, 499 | { 500 | "description": "All built-in, non-system-exiting exceptions are derived from this class. All\nuser-defined exceptions should also be derived from this class.", 501 | "errorName": "Exception", 502 | "example": "", 503 | "id": 84 504 | }, 505 | { 506 | "description": "The base class for those built-in exceptions that are raised for various\narithmetic errors: OverflowError, ZeroDivisionError,\nFloatingPointError.", 507 | "errorName": "ArithmeticError", 508 | "example": "", 509 | "id": 85 510 | }, 511 | { 512 | "description": "Raised when a buffer related operation cannot be\nperformed.", 513 | "errorName": "BufferError", 514 | "example": "", 515 | "id": 86 516 | }, 517 | { 518 | "description": "The base class for the exceptions that are raised when a key or index used on\na mapping or sequence is invalid: IndexError, KeyError. This\ncan be raised directly by codecs.lookup().", 519 | "errorName": "LookupError", 520 | "example": "", 521 | "id": 87 522 | }, 523 | { 524 | "description": "Raised when an assert statement fails.", 525 | "errorName": "AssertionError", 526 | "example": "", 527 | "id": 88 528 | }, 529 | { 530 | "description": "Raised when an attribute reference (see Attribute references) or\nassignment fails. (When an object does not support attribute references or\nattribute assignments at all, TypeError is raised.)", 531 | "errorName": "AttributeError", 532 | "example": "", 533 | "id": 89 534 | }, 535 | { 536 | "description": "Raised when the input() function hits an end-of-file condition (EOF)\nwithout reading any data. (N.B.: the io.IOBase.read() and\nio.IOBase.readline() methods return an empty string when they hit EOF.)", 537 | "errorName": "EOFError", 538 | "example": "", 539 | "id": 90 540 | }, 541 | { 542 | "description": "Not currently used.", 543 | "errorName": "FloatingPointError", 544 | "example": "", 545 | "id": 91 546 | }, 547 | { 548 | "description": "Raised when a generator or coroutine is closed;\nsee generator.close() and coroutine.close(). It\ndirectly inherits from BaseException instead of Exception since\nit is technically not an error.", 549 | "errorName": "GeneratorExit", 550 | "example": "", 551 | "id": 92 552 | }, 553 | { 554 | "description": "Raised when the import statement has troubles trying to\nload a module. Also raised when the “from list” in from ... import\nhas a name that cannot be found.\nThe name and path attributes can be set using keyword-only\narguments to the constructor. When set they represent the name of the module\nthat was attempted to be imported and the path to any file which triggered\nthe exception, respectively.\n\nChanged in version 3.3: Added the name and path attributes.", 555 | "errorName": "ImportError", 556 | "example": "", 557 | "id": 93 558 | }, 559 | { 560 | "description": "A subclass of ImportError which is raised by import\nwhen a module could not be located. It is also raised when None\nis found in sys.modules.\n\nNew in version 3.6.", 561 | "errorName": "ModuleNotFoundError", 562 | "example": "", 563 | "id": 94 564 | }, 565 | { 566 | "description": "Raised when a sequence subscript is out of range. (Slice indices are\nsilently truncated to fall in the allowed range; if an index is not an\ninteger, TypeError is raised.)", 567 | "errorName": "IndexError", 568 | "example": "", 569 | "id": 95 570 | }, 571 | { 572 | "description": "Raised when a mapping (dictionary) key is not found in the set of existing keys.", 573 | "errorName": "KeyError", 574 | "example": "", 575 | "id": 96 576 | }, 577 | { 578 | "description": "Raised when the user hits the interrupt key (normally Control-C or\nDelete). During execution, a check for interrupts is made\nregularly. The exception inherits from BaseException so as to not be\naccidentally caught by code that catches Exception and thus prevent\nthe interpreter from exiting.", 579 | "errorName": "KeyboardInterrupt", 580 | "example": "", 581 | "id": 97 582 | }, 583 | { 584 | "description": "Raised when an operation runs out of memory but the situation may still be\nrescued (by deleting some objects). The associated value is a string indicating\nwhat kind of (internal) operation ran out of memory. Note that because of the\nunderlying memory management architecture (C’s malloc() function), the\ninterpreter may not always be able to completely recover from this situation; it\nnevertheless raises an exception so that a stack traceback can be printed, in\ncase a run-away program was the cause.", 585 | "errorName": "MemoryError", 586 | "example": "", 587 | "id": 98 588 | }, 589 | { 590 | "description": "Raised when a local or global name is not found. This applies only to\nunqualified names. The associated value is an error message that includes the\nname that could not be found.", 591 | "errorName": "NameError", 592 | "example": "", 593 | "id": 99 594 | }, 595 | { 596 | "description": "This exception is derived from RuntimeError. In user defined base\nclasses, abstract methods should raise this exception when they require\nderived classes to override the method, or while the class is being\ndeveloped to indicate that the real implementation still needs to be added.\n\nNote\nIt should not be used to indicate that an operator or method is not\nmeant to be supported at all – in that case either leave the operator /\nmethod undefined or, if a subclass, set it to None.\n\n\nNote\nNotImplementedError and NotImplemented are not interchangeable,\neven though they have similar names and purposes. See\nNotImplemented for details on when to use it.", 597 | "errorName": "NotImplementedError", 598 | "example": "", 599 | "id": 100 600 | }, 601 | { 602 | "description": "This exception is raised when a system function returns a system-related\nerror, including I/O failures such as “file not found” or “disk full”\n(not for illegal argument types or other incidental errors).\nThe second form of the constructor sets the corresponding attributes,\ndescribed below. The attributes default to None if not\nspecified. For backwards compatibility, if three arguments are passed,\nthe args attribute contains only a 2-tuple\nof the first two constructor arguments.\nThe constructor often actually returns a subclass of OSError, as\ndescribed in OS exceptions below. The particular subclass depends on\nthe final errno value. This behaviour only occurs when\nconstructing OSError directly or via an alias, and is not\ninherited when subclassing.\n\n\nerrno¶\nA numeric error code from the C variable errno.\n\n\n\nwinerror¶\nUnder Windows, this gives you the native\nWindows error code. The errno attribute is then an approximate\ntranslation, in POSIX terms, of that native error code.\nUnder Windows, if the winerror constructor argument is an integer,\nthe errno attribute is determined from the Windows error code,\nand the errno argument is ignored. On other platforms, the\nwinerror argument is ignored, and the winerror attribute\ndoes not exist.\n\n\n\nstrerror¶\nThe corresponding error message, as provided by\nthe operating system. It is formatted by the C\nfunctions perror() under POSIX, and FormatMessage()\nunder Windows.\n\n\n\nfilename¶\n\nfilename2¶\nFor exceptions that involve a file system path (such as open() or\nos.unlink()), filename is the file name passed to the function.\nFor functions that involve two file system paths (such as\nos.rename()), filename2 corresponds to the second\nfile name passed to the function.\n\n\nChanged in version 3.3: EnvironmentError, IOError, WindowsError,\nsocket.error, select.error and\nmmap.error have been merged into OSError, and the\nconstructor may return a subclass.\n\n\nChanged in version 3.4: The filename attribute is now the original file name passed to\nthe function, instead of the name encoded to or decoded from the\nfilesystem encoding. Also, the filename2 constructor argument and\nattribute was added.", 603 | "errorName": "OSError", 604 | "example": "", 605 | "id": 101 606 | }, 607 | { 608 | "description": "A numeric error code from the C variable errno.", 609 | "errorName": "errno", 610 | "example": "", 611 | "id": 102 612 | }, 613 | { 614 | "description": "Under Windows, this gives you the native\nWindows error code. The errno attribute is then an approximate\ntranslation, in POSIX terms, of that native error code.\nUnder Windows, if the winerror constructor argument is an integer,\nthe errno attribute is determined from the Windows error code,\nand the errno argument is ignored. On other platforms, the\nwinerror argument is ignored, and the winerror attribute\ndoes not exist.", 615 | "errorName": "winerror", 616 | "example": "", 617 | "id": 103 618 | }, 619 | { 620 | "description": "The corresponding error message, as provided by\nthe operating system. It is formatted by the C\nfunctions perror() under POSIX, and FormatMessage()\nunder Windows.", 621 | "errorName": "strerror", 622 | "example": "", 623 | "id": 104 624 | }, 625 | { 626 | "description": "For exceptions that involve a file system path (such as open() or\nos.unlink()), filename is the file name passed to the function.\nFor functions that involve two file system paths (such as\nos.rename()), filename2 corresponds to the second\nfile name passed to the function.", 627 | "errorName": "filename", 628 | "example": "", 629 | "id": 105 630 | }, 631 | { 632 | "description": "Raised when the result of an arithmetic operation is too large to be\nrepresented. This cannot occur for integers (which would rather raise\nMemoryError than give up). However, for historical reasons,\nOverflowError is sometimes raised for integers that are outside a required\nrange. Because of the lack of standardization of floating point exception\nhandling in C, most floating point operations are not checked.", 633 | "errorName": "OverflowError", 634 | "example": "", 635 | "id": 106 636 | }, 637 | { 638 | "description": "This exception is derived from RuntimeError. It is raised when the\ninterpreter detects that the maximum recursion depth (see\nsys.getrecursionlimit()) is exceeded.\n\nNew in version 3.5: Previously, a plain RuntimeError was raised.", 639 | "errorName": "RecursionError", 640 | "example": "", 641 | "id": 107 642 | }, 643 | { 644 | "description": "This exception is raised when a weak reference proxy, created by the\nweakref.proxy() function, is used to access an attribute of the referent\nafter it has been garbage collected. For more information on weak references,\nsee the weakref module.", 645 | "errorName": "ReferenceError", 646 | "example": "", 647 | "id": 108 648 | }, 649 | { 650 | "description": "Raised when an error is detected that doesn’t fall in any of the other\ncategories. The associated value is a string indicating what precisely went\nwrong.", 651 | "errorName": "RuntimeError", 652 | "example": "", 653 | "id": 109 654 | }, 655 | { 656 | "description": "Raised by built-in function next() and an iterator’s\n__next__() method to signal that there are no further\nitems produced by the iterator.\nThe exception object has a single attribute value, which is\ngiven as an argument when constructing the exception, and defaults\nto None.\nWhen a generator or coroutine function\nreturns, a new StopIteration instance is\nraised, and the value returned by the function is used as the\nvalue parameter to the constructor of the exception.\nIf a generator code directly or indirectly raises StopIteration,\nit is converted into a RuntimeError (retaining the\nStopIteration as the new exception’s cause).\n\nChanged in version 3.3: Added value attribute and the ability for generator functions to\nuse it to return a value.\n\n\nChanged in version 3.5: Introduced the RuntimeError transformation via\nfrom __future__ import generator_stop, see PEP 479.\n\n\nChanged in version 3.7: Enable PEP 479 for all code by default: a StopIteration\nerror raised in a generator is transformed into a RuntimeError.", 657 | "errorName": "StopIteration", 658 | "example": "", 659 | "id": 110 660 | }, 661 | { 662 | "description": "Must be raised by __anext__() method of an\nasynchronous iterator object to stop the iteration.\n\nNew in version 3.5.", 663 | "errorName": "StopAsyncIteration", 664 | "example": "", 665 | "id": 111 666 | }, 667 | { 668 | "description": "Raised when the parser encounters a syntax error. This may occur in an\nimport statement, in a call to the built-in functions exec()\nor eval(), or when reading the initial script or standard input\n(also interactively).\nInstances of this class have attributes filename, lineno,\noffset and text for easier access to the details. str()\nof the exception instance returns only the message.", 669 | "errorName": "SyntaxError", 670 | "example": "", 671 | "id": 112 672 | }, 673 | { 674 | "description": "Base class for syntax errors related to incorrect indentation. This is a\nsubclass of SyntaxError.", 675 | "errorName": "IndentationError", 676 | "example": "", 677 | "id": 113 678 | }, 679 | { 680 | "description": "Raised when indentation contains an inconsistent use of tabs and spaces.\nThis is a subclass of IndentationError.", 681 | "errorName": "TabError", 682 | "example": "", 683 | "id": 114 684 | }, 685 | { 686 | "description": "Raised when the interpreter finds an internal error, but the situation does not\nlook so serious to cause it to abandon all hope. The associated value is a\nstring indicating what went wrong (in low-level terms).\nYou should report this to the author or maintainer of your Python interpreter.\nBe sure to report the version of the Python interpreter (sys.version; it is\nalso printed at the start of an interactive Python session), the exact error\nmessage (the exception’s associated value) and if possible the source of the\nprogram that triggered the error.", 687 | "errorName": "SystemError", 688 | "example": "", 689 | "id": 115 690 | }, 691 | { 692 | "description": "This exception is raised by the sys.exit() function. It inherits from\nBaseException instead of Exception so that it is not accidentally\ncaught by code that catches Exception. This allows the exception to\nproperly propagate up and cause the interpreter to exit. When it is not\nhandled, the Python interpreter exits; no stack traceback is printed. The\nconstructor accepts the same optional argument passed to sys.exit().\nIf the value is an integer, it specifies the system exit status (passed to\nC’s exit() function); if it is None, the exit status is zero; if\nit has another type (such as a string), the object’s value is printed and\nthe exit status is one.\nA call to sys.exit() is translated into an exception so that clean-up\nhandlers (finally clauses of try statements) can be\nexecuted, and so that a debugger can execute a script without running the risk\nof losing control. The os._exit() function can be used if it is\nabsolutely positively necessary to exit immediately (for example, in the child\nprocess after a call to os.fork()).\n\n\ncode¶\nThe exit status or error message that is passed to the constructor.\n(Defaults to None.)", 693 | "errorName": "SystemExit", 694 | "example": "", 695 | "id": 116 696 | }, 697 | { 698 | "description": "The exit status or error message that is passed to the constructor.\n(Defaults to None.)", 699 | "errorName": "code", 700 | "example": "", 701 | "id": 117 702 | }, 703 | { 704 | "description": "Raised when an operation or function is applied to an object of inappropriate\ntype. The associated value is a string giving details about the type mismatch.\nThis exception may be raised by user code to indicate that an attempted\noperation on an object is not supported, and is not meant to be. If an object\nis meant to support a given operation but has not yet provided an\nimplementation, NotImplementedError is the proper exception to raise.\nPassing arguments of the wrong type (e.g. passing a list when an\nint is expected) should result in a TypeError, but passing\narguments with the wrong value (e.g. a number outside expected boundaries)\nshould result in a ValueError.", 705 | "errorName": "TypeError", 706 | "example": "", 707 | "id": 118 708 | }, 709 | { 710 | "description": "Raised when a reference is made to a local variable in a function or method, but\nno value has been bound to that variable. This is a subclass of\nNameError.", 711 | "errorName": "UnboundLocalError", 712 | "example": "", 713 | "id": 119 714 | }, 715 | { 716 | "description": "Raised when a Unicode-related encoding or decoding error occurs. It is a\nsubclass of ValueError.\nUnicodeError has attributes that describe the encoding or decoding\nerror. For example, err.object[err.start:err.end] gives the particular\ninvalid input that the codec failed on.\n\n\nencoding¶\nThe name of the encoding that raised the error.\n\n\n\nreason¶\nA string describing the specific codec error.\n\n\n\nobject¶\nThe object the codec was attempting to encode or decode.\n\n\n\nstart¶\nThe first index of invalid data in object.\n\n\n\nend¶\nThe index after the last invalid data in object.", 717 | "errorName": "UnicodeError", 718 | "example": "", 719 | "id": 120 720 | }, 721 | { 722 | "description": "The name of the encoding that raised the error.", 723 | "errorName": "encoding", 724 | "example": "", 725 | "id": 121 726 | }, 727 | { 728 | "description": "A string describing the specific codec error.", 729 | "errorName": "reason", 730 | "example": "", 731 | "id": 122 732 | }, 733 | { 734 | "description": "The object the codec was attempting to encode or decode.", 735 | "errorName": "object", 736 | "example": "", 737 | "id": 123 738 | }, 739 | { 740 | "description": "The first index of invalid data in object.", 741 | "errorName": "start", 742 | "example": "", 743 | "id": 124 744 | }, 745 | { 746 | "description": "The index after the last invalid data in object.", 747 | "errorName": "end", 748 | "example": "", 749 | "id": 125 750 | }, 751 | { 752 | "description": "Raised when a Unicode-related error occurs during encoding. It is a subclass of\nUnicodeError.", 753 | "errorName": "UnicodeEncodeError", 754 | "example": "", 755 | "id": 126 756 | }, 757 | { 758 | "description": "Raised when a Unicode-related error occurs during decoding. It is a subclass of\nUnicodeError.", 759 | "errorName": "UnicodeDecodeError", 760 | "example": "", 761 | "id": 127 762 | }, 763 | { 764 | "description": "Raised when a Unicode-related error occurs during translating. It is a subclass\nof UnicodeError.", 765 | "errorName": "UnicodeTranslateError", 766 | "example": "", 767 | "id": 128 768 | }, 769 | { 770 | "description": "Raised when an operation or function receives an argument that has the\nright type but an inappropriate value, and the situation is not described by a\nmore precise exception such as IndexError.", 771 | "errorName": "ValueError", 772 | "example": "", 773 | "id": 129 774 | }, 775 | { 776 | "description": "Raised when the second argument of a division or modulo operation is zero. The\nassociated value is a string indicating the type of the operands and the\noperation.", 777 | "errorName": "ZeroDivisionError", 778 | "example": "", 779 | "id": 130 780 | }, 781 | { 782 | "description": "", 783 | "errorName": "EnvironmentError", 784 | "example": "", 785 | "id": 131 786 | }, 787 | { 788 | "description": "", 789 | "errorName": "IOError", 790 | "example": "", 791 | "id": 132 792 | }, 793 | { 794 | "description": "Only available on Windows.", 795 | "errorName": "WindowsError", 796 | "example": "", 797 | "id": 133 798 | }, 799 | { 800 | "description": "Raised when an operation would block on an object (e.g. socket) set\nfor non-blocking operation.\nCorresponds to errno EAGAIN, EALREADY,\nEWOULDBLOCK and EINPROGRESS.\nIn addition to those of OSError, BlockingIOError can have\none more attribute:\n\n\ncharacters_written¶\nAn integer containing the number of characters written to the stream\nbefore it blocked. This attribute is available when using the\nbuffered I/O classes from the io module.", 801 | "errorName": "BlockingIOError", 802 | "example": "", 803 | "id": 134 804 | }, 805 | { 806 | "description": "An integer containing the number of characters written to the stream\nbefore it blocked. This attribute is available when using the\nbuffered I/O classes from the io module.", 807 | "errorName": "characters_written", 808 | "example": "", 809 | "id": 135 810 | }, 811 | { 812 | "description": "Raised when an operation on a child process failed.\nCorresponds to errno ECHILD.", 813 | "errorName": "ChildProcessError", 814 | "example": "", 815 | "id": 136 816 | }, 817 | { 818 | "description": "A base class for connection-related issues.\nSubclasses are BrokenPipeError, ConnectionAbortedError,\nConnectionRefusedError and ConnectionResetError.", 819 | "errorName": "ConnectionError", 820 | "example": "", 821 | "id": 137 822 | }, 823 | { 824 | "description": "A subclass of ConnectionError, raised when trying to write on a\npipe while the other end has been closed, or trying to write on a socket\nwhich has been shutdown for writing.\nCorresponds to errno EPIPE and ESHUTDOWN.", 825 | "errorName": "BrokenPipeError", 826 | "example": "", 827 | "id": 138 828 | }, 829 | { 830 | "description": "A subclass of ConnectionError, raised when a connection attempt\nis aborted by the peer.\nCorresponds to errno ECONNABORTED.", 831 | "errorName": "ConnectionAbortedError", 832 | "example": "", 833 | "id": 139 834 | }, 835 | { 836 | "description": "A subclass of ConnectionError, raised when a connection attempt\nis refused by the peer.\nCorresponds to errno ECONNREFUSED.", 837 | "errorName": "ConnectionRefusedError", 838 | "example": "", 839 | "id": 140 840 | }, 841 | { 842 | "description": "A subclass of ConnectionError, raised when a connection is\nreset by the peer.\nCorresponds to errno ECONNRESET.", 843 | "errorName": "ConnectionResetError", 844 | "example": "", 845 | "id": 141 846 | }, 847 | { 848 | "description": "Raised when trying to create a file or directory which already exists.\nCorresponds to errno EEXIST.", 849 | "errorName": "FileExistsError", 850 | "example": "", 851 | "id": 142 852 | }, 853 | { 854 | "description": "Raised when a file or directory is requested but doesn’t exist.\nCorresponds to errno ENOENT.", 855 | "errorName": "FileNotFoundError", 856 | "example": "", 857 | "id": 143 858 | }, 859 | { 860 | "description": "Raised when a system call is interrupted by an incoming signal.\nCorresponds to errno EINTR.\n\nChanged in version 3.5: Python now retries system calls when a syscall is interrupted by a\nsignal, except if the signal handler raises an exception (see PEP 475\nfor the rationale), instead of raising InterruptedError.", 861 | "errorName": "InterruptedError", 862 | "example": "", 863 | "id": 144 864 | }, 865 | { 866 | "description": "Raised when a file operation (such as os.remove()) is requested\non a directory.\nCorresponds to errno EISDIR.", 867 | "errorName": "IsADirectoryError", 868 | "example": "", 869 | "id": 145 870 | }, 871 | { 872 | "description": "Raised when a directory operation (such as os.listdir()) is requested\non something which is not a directory.\nCorresponds to errno ENOTDIR.", 873 | "errorName": "NotADirectoryError", 874 | "example": "", 875 | "id": 146 876 | }, 877 | { 878 | "description": "Raised when trying to run an operation without the adequate access\nrights - for example filesystem permissions.\nCorresponds to errno EACCES and EPERM.", 879 | "errorName": "PermissionError", 880 | "example": "", 881 | "id": 147 882 | }, 883 | { 884 | "description": "Raised when a given process doesn’t exist.\nCorresponds to errno ESRCH.", 885 | "errorName": "ProcessLookupError", 886 | "example": "", 887 | "id": 148 888 | }, 889 | { 890 | "description": "Raised when a system function timed out at the system level.\nCorresponds to errno ETIMEDOUT.", 891 | "errorName": "TimeoutError", 892 | "example": "", 893 | "id": 149 894 | }, 895 | { 896 | "description": "Raised when an operation would block on an object (e.g. socket) set\nfor non-blocking operation.\nCorresponds to errno EAGAIN, EALREADY,\nEWOULDBLOCK and EINPROGRESS.\nIn addition to those of OSError, BlockingIOError can have\none more attribute:\n\n\ncharacters_written¶\nAn integer containing the number of characters written to the stream\nbefore it blocked. This attribute is available when using the\nbuffered I/O classes from the io module.", 897 | "errorName": "BlockingIOError", 898 | "example": "", 899 | "id": 150 900 | }, 901 | { 902 | "description": "An integer containing the number of characters written to the stream\nbefore it blocked. This attribute is available when using the\nbuffered I/O classes from the io module.", 903 | "errorName": "characters_written", 904 | "example": "", 905 | "id": 151 906 | }, 907 | { 908 | "description": "Raised when an operation on a child process failed.\nCorresponds to errno ECHILD.", 909 | "errorName": "ChildProcessError", 910 | "example": "", 911 | "id": 152 912 | }, 913 | { 914 | "description": "A base class for connection-related issues.\nSubclasses are BrokenPipeError, ConnectionAbortedError,\nConnectionRefusedError and ConnectionResetError.", 915 | "errorName": "ConnectionError", 916 | "example": "", 917 | "id": 153 918 | }, 919 | { 920 | "description": "A subclass of ConnectionError, raised when trying to write on a\npipe while the other end has been closed, or trying to write on a socket\nwhich has been shutdown for writing.\nCorresponds to errno EPIPE and ESHUTDOWN.", 921 | "errorName": "BrokenPipeError", 922 | "example": "", 923 | "id": 154 924 | }, 925 | { 926 | "description": "A subclass of ConnectionError, raised when a connection attempt\nis aborted by the peer.\nCorresponds to errno ECONNABORTED.", 927 | "errorName": "ConnectionAbortedError", 928 | "example": "", 929 | "id": 155 930 | }, 931 | { 932 | "description": "A subclass of ConnectionError, raised when a connection attempt\nis refused by the peer.\nCorresponds to errno ECONNREFUSED.", 933 | "errorName": "ConnectionRefusedError", 934 | "example": "", 935 | "id": 156 936 | }, 937 | { 938 | "description": "A subclass of ConnectionError, raised when a connection is\nreset by the peer.\nCorresponds to errno ECONNRESET.", 939 | "errorName": "ConnectionResetError", 940 | "example": "", 941 | "id": 157 942 | }, 943 | { 944 | "description": "Raised when trying to create a file or directory which already exists.\nCorresponds to errno EEXIST.", 945 | "errorName": "FileExistsError", 946 | "example": "", 947 | "id": 158 948 | }, 949 | { 950 | "description": "Raised when a file or directory is requested but doesn’t exist.\nCorresponds to errno ENOENT.", 951 | "errorName": "FileNotFoundError", 952 | "example": "", 953 | "id": 159 954 | }, 955 | { 956 | "description": "Raised when a system call is interrupted by an incoming signal.\nCorresponds to errno EINTR.\n\nChanged in version 3.5: Python now retries system calls when a syscall is interrupted by a\nsignal, except if the signal handler raises an exception (see PEP 475\nfor the rationale), instead of raising InterruptedError.", 957 | "errorName": "InterruptedError", 958 | "example": "", 959 | "id": 160 960 | }, 961 | { 962 | "description": "Raised when a file operation (such as os.remove()) is requested\non a directory.\nCorresponds to errno EISDIR.", 963 | "errorName": "IsADirectoryError", 964 | "example": "", 965 | "id": 161 966 | }, 967 | { 968 | "description": "Raised when a directory operation (such as os.listdir()) is requested\non something which is not a directory.\nCorresponds to errno ENOTDIR.", 969 | "errorName": "NotADirectoryError", 970 | "example": "", 971 | "id": 162 972 | }, 973 | { 974 | "description": "Raised when trying to run an operation without the adequate access\nrights - for example filesystem permissions.\nCorresponds to errno EACCES and EPERM.", 975 | "errorName": "PermissionError", 976 | "example": "", 977 | "id": 163 978 | }, 979 | { 980 | "description": "Raised when a given process doesn’t exist.\nCorresponds to errno ESRCH.", 981 | "errorName": "ProcessLookupError", 982 | "example": "", 983 | "id": 164 984 | }, 985 | { 986 | "description": "Raised when a system function timed out at the system level.\nCorresponds to errno ETIMEDOUT.", 987 | "errorName": "TimeoutError", 988 | "example": "", 989 | "id": 165 990 | }, 991 | { 992 | "description": "Base class for warning categories.", 993 | "errorName": "Warning", 994 | "example": "", 995 | "id": 166 996 | }, 997 | { 998 | "description": "Base class for warnings generated by user code.", 999 | "errorName": "UserWarning", 1000 | "example": "", 1001 | "id": 167 1002 | }, 1003 | { 1004 | "description": "Base class for warnings about deprecated features when those warnings are\nintended for other Python developers.", 1005 | "errorName": "DeprecationWarning", 1006 | "example": "", 1007 | "id": 168 1008 | }, 1009 | { 1010 | "description": "Base class for warnings about features which will be deprecated in the\nfuture.", 1011 | "errorName": "PendingDeprecationWarning", 1012 | "example": "", 1013 | "id": 169 1014 | }, 1015 | { 1016 | "description": "Base class for warnings about dubious syntax.", 1017 | "errorName": "SyntaxWarning", 1018 | "example": "", 1019 | "id": 170 1020 | }, 1021 | { 1022 | "description": "Base class for warnings about dubious runtime behavior.", 1023 | "errorName": "RuntimeWarning", 1024 | "example": "", 1025 | "id": 171 1026 | }, 1027 | { 1028 | "description": "Base class for warnings about deprecated features when those warnings are\nintended for end users of applications that are written in Python.", 1029 | "errorName": "FutureWarning", 1030 | "example": "", 1031 | "id": 172 1032 | }, 1033 | { 1034 | "description": "Base class for warnings about probable mistakes in module imports.", 1035 | "errorName": "ImportWarning", 1036 | "example": "", 1037 | "id": 173 1038 | }, 1039 | { 1040 | "description": "Base class for warnings related to Unicode.", 1041 | "errorName": "UnicodeWarning", 1042 | "example": "", 1043 | "id": 174 1044 | }, 1045 | { 1046 | "description": "Base class for warnings related to bytes and bytearray.", 1047 | "errorName": "BytesWarning", 1048 | "example": "", 1049 | "id": 175 1050 | }, 1051 | { 1052 | "description": "Base class for warnings related to resource usage. Ignored by the default\nwarning filters.\n\nNew in version 3.2.", 1053 | "errorName": "ResourceWarning", 1054 | "example": "", 1055 | "id": 176 1056 | } 1057 | ] 1058 | } --------------------------------------------------------------------------------