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