Debian Codegraph @

Doc/library/errno.rst

raw
1 :mod:`!errno` --- Standard errno system symbols
2 ===============================================
3
4 .. module:: errno
5 :synopsis: Standard errno system symbols.
6
7 ----------------
8
9 This module makes available standard ``errno`` system symbols. The value of each
10 symbol is the corresponding integer value. The names and descriptions are
11 borrowed from :file:`linux/include/errno.h`, which should be
12 all-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
21 To translate a numeric error code to an error message, use :func:`os.strerror`.
22
23 Of the following list, symbols that are not used on the current platform are not
24 defined 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:: EHWPOISON
617
618 Memory page has hardware error.
619
620 .. versionadded:: 3.14
621
622
623 .. data:: EALREADY
624
625 Operation already in progress. This error is mapped to the
626 exception :exc:`BlockingIOError`.
627
628
629 .. data:: EINPROGRESS
630
631 Operation now in progress. This error is mapped to the exception
632 :exc:`BlockingIOError`.
633
634
635 .. data:: ESTALE
636
637 Stale NFS file handle
638
639
640 .. data:: EUCLEAN
641
642 Structure needs cleaning
643
644
645 .. data:: ENOTNAM
646
647 Not a XENIX named type file
648
649
650 .. data:: ENAVAIL
651
652 No XENIX semaphores available
653
654
655 .. data:: EISNAM
656
657 Is a named type file
658
659
660 .. data:: EREMOTEIO
661
662 Remote I/O error
663
664
665 .. data:: EDQUOT
666
667 Quota exceeded
668
669 .. data:: EQFULL
670
671 Interface output queue is full
672
673 .. versionadded:: 3.11
674
675
676 .. data:: ENOMEDIUM
677
678 No medium found
679
680
681 .. data:: EMEDIUMTYPE
682
683 Wrong medium type
684
685
686 .. data:: ENOKEY
687
688 Required key not available
689
690
691 .. data:: EKEYEXPIRED
692
693 Key has expired
694
695
696 .. data:: EKEYREVOKED
697
698 Key has been revoked
699
700
701 .. data:: EKEYREJECTED
702
703 Key was rejected by service
704
705
706 .. data:: ERFKILL
707
708 Operation not possible due to RF-kill
709
710
711 .. data:: ELOCKUNMAPPED
712
713 Locked lock was unmapped
714
715
716 .. data:: ENOTACTIVE
717
718 Facility is not active
719
720
721 .. data:: EAUTH
722
723 Authentication error
724
725 .. versionadded:: 3.2
726
727
728 .. data:: EBADARCH
729
730 Bad CPU type in executable
731
732 .. versionadded:: 3.2
733
734
735 .. data:: EBADEXEC
736
737 Bad executable (or shared library)
738
739 .. versionadded:: 3.2
740
741
742 .. data:: EBADMACHO
743
744 Malformed Mach-o file
745
746 .. versionadded:: 3.2
747
748
749 .. data:: EDEVERR
750
751 Device error
752
753 .. versionadded:: 3.2
754
755
756 .. data:: EFTYPE
757
758 Inappropriate file type or format
759
760 .. versionadded:: 3.2
761
762
763 .. data:: ENEEDAUTH
764
765 Need authenticator
766
767 .. versionadded:: 3.2
768
769
770 .. data:: ENOATTR
771
772 Attribute not found
773
774 .. versionadded:: 3.2
775
776
777 .. data:: ENOPOLICY
778
779 Policy not found
780
781 .. versionadded:: 3.2
782
783
784 .. data:: EPROCLIM
785
786 Too many processes
787
788 .. versionadded:: 3.2
789
790
791 .. data:: EPROCUNAVAIL
792
793 Bad procedure for program
794
795 .. versionadded:: 3.2
796
797
798 .. data:: EPROGMISMATCH
799
800 Program version wrong
801
802 .. versionadded:: 3.2
803
804
805 .. data:: EPROGUNAVAIL
806
807 RPC prog. not avail
808
809 .. versionadded:: 3.2
810
811
812 .. data:: EPWROFF
813
814 Device power is off
815
816 .. versionadded:: 3.2
817
818
819 .. data:: EBADRPC
820
821 RPC struct is bad
822
823 .. versionadded:: 3.2
824
825
826 .. data:: ERPCMISMATCH
827
828 RPC version wrong
829
830 .. versionadded:: 3.2
831
832
833 .. data:: ESHLIBVERS
834
835 Shared library version mismatch
836
837 .. versionadded:: 3.2
838
839
840 .. data:: ENOTCAPABLE
841
842 Capabilities insufficient. This error is mapped to the exception
843 :exc:`PermissionError`.
844
845 .. availability:: WASI, FreeBSD
846
847 .. versionadded:: 3.11.1
848
849
850 .. data:: ECANCELED
851
852 Operation canceled
853
854 .. versionadded:: 3.2
855
856
857 .. data:: EOWNERDEAD
858
859 Owner died
860
861 .. versionadded:: 3.2
862
863
864 .. data:: ENOTRECOVERABLE
865
866 State not recoverable
867
868 .. versionadded:: 3.2