• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1:mod:`!errno` --- Standard errno system symbols
2===============================================
3
4.. module:: errno
5   :synopsis: Standard errno system symbols.
6
7----------------
8
9This module makes available standard ``errno`` system symbols. The value of each
10symbol is the corresponding integer value. The names and descriptions are
11borrowed from :file:`linux/include/errno.h`, which should be
12all-inclusive.
13
14
15.. data:: errorcode
16
17   Dictionary providing a mapping from the errno value to the string name in the
18   underlying system.  For instance, ``errno.errorcode[errno.EPERM]`` maps to
19   ``'EPERM'``.
20
21To translate a numeric error code to an error message, use :func:`os.strerror`.
22
23Of the following list, symbols that are not used on the current platform are not
24defined by the module.  The specific list of defined symbols is available as
25``errno.errorcode.keys()``.  Symbols available can include:
26
27
28.. data:: EPERM
29
30   Operation not permitted. This error is mapped to the exception
31   :exc:`PermissionError`.
32
33
34.. data:: ENOENT
35
36   No such file or directory. This error is mapped to the exception
37   :exc:`FileNotFoundError`.
38
39
40.. data:: ESRCH
41
42   No such process. This error is mapped to the exception
43   :exc:`ProcessLookupError`.
44
45
46.. data:: EINTR
47
48   Interrupted system call. This error is mapped to the exception
49   :exc:`InterruptedError`.
50
51
52.. data:: EIO
53
54   I/O error
55
56
57.. data:: ENXIO
58
59   No such device or address
60
61
62.. data:: E2BIG
63
64   Arg list too long
65
66
67.. data:: ENOEXEC
68
69   Exec format error
70
71
72.. data:: EBADF
73
74   Bad file number
75
76
77.. data:: ECHILD
78
79   No child processes. This error is mapped to the exception
80   :exc:`ChildProcessError`.
81
82
83.. data:: EAGAIN
84
85   Try again. This error is mapped to the exception :exc:`BlockingIOError`.
86
87
88.. data:: ENOMEM
89
90   Out of memory
91
92
93.. data:: EACCES
94
95   Permission denied.  This error is mapped to the exception
96   :exc:`PermissionError`.
97
98
99.. data:: EFAULT
100
101   Bad address
102
103
104.. data:: ENOTBLK
105
106   Block device required
107
108
109.. data:: EBUSY
110
111   Device or resource busy
112
113
114.. data:: EEXIST
115
116   File exists. This error is mapped to the exception
117   :exc:`FileExistsError`.
118
119
120.. data:: EXDEV
121
122   Cross-device link
123
124
125.. data:: ENODEV
126
127   No such device
128
129
130.. data:: ENOTDIR
131
132   Not a directory. This error is mapped to the exception
133   :exc:`NotADirectoryError`.
134
135
136.. data:: EISDIR
137
138   Is a directory. This error is mapped to the exception
139   :exc:`IsADirectoryError`.
140
141
142.. data:: EINVAL
143
144   Invalid argument
145
146
147.. data:: ENFILE
148
149   File table overflow
150
151
152.. data:: EMFILE
153
154   Too many open files
155
156
157.. data:: ENOTTY
158
159   Not a typewriter
160
161
162.. data:: ETXTBSY
163
164   Text file busy
165
166
167.. data:: EFBIG
168
169   File too large
170
171
172.. data:: ENOSPC
173
174   No space left on device
175
176
177.. data:: ESPIPE
178
179   Illegal seek
180
181
182.. data:: EROFS
183
184   Read-only file system
185
186
187.. data:: EMLINK
188
189   Too many links
190
191
192.. data:: EPIPE
193
194   Broken pipe. This error is mapped to the exception
195   :exc:`BrokenPipeError`.
196
197
198.. data:: EDOM
199
200   Math argument out of domain of func
201
202
203.. data:: ERANGE
204
205   Math result not representable
206
207
208.. data:: EDEADLK
209
210   Resource deadlock would occur
211
212
213.. data:: ENAMETOOLONG
214
215   File name too long
216
217
218.. data:: ENOLCK
219
220   No record locks available
221
222
223.. data:: ENOSYS
224
225   Function not implemented
226
227
228.. data:: ENOTEMPTY
229
230   Directory not empty
231
232
233.. data:: ELOOP
234
235   Too many symbolic links encountered
236
237
238.. data:: EWOULDBLOCK
239
240   Operation would block. This error is mapped to the exception
241   :exc:`BlockingIOError`.
242
243
244.. data:: ENOMSG
245
246   No message of desired type
247
248
249.. data:: EIDRM
250
251   Identifier removed
252
253
254.. data:: ECHRNG
255
256   Channel number out of range
257
258
259.. data:: EL2NSYNC
260
261   Level 2 not synchronized
262
263
264.. data:: EL3HLT
265
266   Level 3 halted
267
268
269.. data:: EL3RST
270
271   Level 3 reset
272
273
274.. data:: ELNRNG
275
276   Link number out of range
277
278
279.. data:: EUNATCH
280
281   Protocol driver not attached
282
283
284.. data:: ENOCSI
285
286   No CSI structure available
287
288
289.. data:: EL2HLT
290
291   Level 2 halted
292
293
294.. data:: EBADE
295
296   Invalid exchange
297
298
299.. data:: EBADR
300
301   Invalid request descriptor
302
303
304.. data:: EXFULL
305
306   Exchange full
307
308
309.. data:: ENOANO
310
311   No anode
312
313
314.. data:: EBADRQC
315
316   Invalid request code
317
318
319.. data:: EBADSLT
320
321   Invalid slot
322
323
324.. data:: EDEADLOCK
325
326   File locking deadlock error
327
328
329.. data:: EBFONT
330
331   Bad font file format
332
333
334.. data:: ENOSTR
335
336   Device not a stream
337
338
339.. data:: ENODATA
340
341   No data available
342
343
344.. data:: ETIME
345
346   Timer expired
347
348
349.. data:: ENOSR
350
351   Out of streams resources
352
353
354.. data:: ENONET
355
356   Machine is not on the network
357
358
359.. data:: ENOPKG
360
361   Package not installed
362
363
364.. data:: EREMOTE
365
366   Object is remote
367
368
369.. data:: ENOLINK
370
371   Link has been severed
372
373
374.. data:: EADV
375
376   Advertise error
377
378
379.. data:: ESRMNT
380
381   Srmount error
382
383
384.. data:: ECOMM
385
386   Communication error on send
387
388
389.. data:: EPROTO
390
391   Protocol error
392
393
394.. data:: EMULTIHOP
395
396   Multihop attempted
397
398
399.. data:: EDOTDOT
400
401   RFS specific error
402
403
404.. data:: EBADMSG
405
406   Not a data message
407
408
409.. data:: EOVERFLOW
410
411   Value too large for defined data type
412
413
414.. data:: ENOTUNIQ
415
416   Name not unique on network
417
418
419.. data:: EBADFD
420
421   File descriptor in bad state
422
423
424.. data:: EREMCHG
425
426   Remote address changed
427
428
429.. data:: ELIBACC
430
431   Can not access a needed shared library
432
433
434.. data:: ELIBBAD
435
436   Accessing a corrupted shared library
437
438
439.. data:: ELIBSCN
440
441   .lib section in a.out corrupted
442
443
444.. data:: ELIBMAX
445
446   Attempting to link in too many shared libraries
447
448
449.. data:: ELIBEXEC
450
451   Cannot exec a shared library directly
452
453
454.. data:: EILSEQ
455
456   Illegal byte sequence
457
458
459.. data:: ERESTART
460
461   Interrupted system call should be restarted
462
463
464.. data:: ESTRPIPE
465
466   Streams pipe error
467
468
469.. data:: EUSERS
470
471   Too many users
472
473
474.. data:: ENOTSOCK
475
476   Socket operation on non-socket
477
478
479.. data:: EDESTADDRREQ
480
481   Destination address required
482
483
484.. data:: EMSGSIZE
485
486   Message too long
487
488
489.. data:: EPROTOTYPE
490
491   Protocol wrong type for socket
492
493
494.. data:: ENOPROTOOPT
495
496   Protocol not available
497
498
499.. data:: EPROTONOSUPPORT
500
501   Protocol not supported
502
503
504.. data:: ESOCKTNOSUPPORT
505
506   Socket type not supported
507
508
509.. data:: EOPNOTSUPP
510
511   Operation not supported on transport endpoint
512
513
514.. data:: ENOTSUP
515
516   Operation not supported
517
518   .. versionadded:: 3.2
519
520
521.. data:: EPFNOSUPPORT
522
523   Protocol family not supported
524
525
526.. data:: EAFNOSUPPORT
527
528   Address family not supported by protocol
529
530
531.. data:: EADDRINUSE
532
533   Address already in use
534
535
536.. data:: EADDRNOTAVAIL
537
538   Cannot assign requested address
539
540
541.. data:: ENETDOWN
542
543   Network is down
544
545
546.. data:: ENETUNREACH
547
548   Network is unreachable
549
550
551.. data:: ENETRESET
552
553   Network dropped connection because of reset
554
555
556.. data:: ECONNABORTED
557
558   Software caused connection abort. This error is mapped to the
559   exception :exc:`ConnectionAbortedError`.
560
561
562.. data:: ECONNRESET
563
564   Connection reset by peer. This error is mapped to the exception
565   :exc:`ConnectionResetError`.
566
567
568.. data:: ENOBUFS
569
570   No buffer space available
571
572
573.. data:: EISCONN
574
575   Transport endpoint is already connected
576
577
578.. data:: ENOTCONN
579
580   Transport endpoint is not connected
581
582
583.. data:: ESHUTDOWN
584
585   Cannot send after transport endpoint shutdown. This error is mapped
586   to the exception :exc:`BrokenPipeError`.
587
588
589.. data:: ETOOMANYREFS
590
591   Too many references: cannot splice
592
593
594.. data:: ETIMEDOUT
595
596   Connection timed out. This error is mapped to the exception
597   :exc:`TimeoutError`.
598
599
600.. data:: ECONNREFUSED
601
602   Connection refused. This error is mapped to the exception
603   :exc:`ConnectionRefusedError`.
604
605
606.. data:: EHOSTDOWN
607
608   Host is down
609
610
611.. data:: EHOSTUNREACH
612
613   No route to host
614
615
616.. data:: EALREADY
617
618   Operation already in progress. This error is mapped to the
619   exception :exc:`BlockingIOError`.
620
621
622.. data:: EINPROGRESS
623
624   Operation now in progress. This error is mapped to the exception
625   :exc:`BlockingIOError`.
626
627
628.. data:: ESTALE
629
630   Stale NFS file handle
631
632
633.. data:: EUCLEAN
634
635   Structure needs cleaning
636
637
638.. data:: ENOTNAM
639
640   Not a XENIX named type file
641
642
643.. data:: ENAVAIL
644
645   No XENIX semaphores available
646
647
648.. data:: EISNAM
649
650   Is a named type file
651
652
653.. data:: EREMOTEIO
654
655   Remote I/O error
656
657
658.. data:: EDQUOT
659
660   Quota exceeded
661
662.. data:: EQFULL
663
664   Interface output queue is full
665
666   .. versionadded:: 3.11
667
668.. data:: ENOTCAPABLE
669
670   Capabilities insufficient. This error is mapped to the exception
671   :exc:`PermissionError`.
672
673   .. availability:: WASI, FreeBSD
674
675   .. versionadded:: 3.11.1
676
677
678.. data:: ECANCELED
679
680   Operation canceled
681
682   .. versionadded:: 3.2
683
684
685.. data:: EOWNERDEAD
686
687   Owner died
688
689   .. versionadded:: 3.2
690
691
692.. data:: ENOTRECOVERABLE
693
694   State not recoverable
695
696   .. versionadded:: 3.2
697