From time to time I\'m getting an OSError exception with the message \'out of pty devices\' when calling pty.openpty() (it\'s happening when a bunch of instance
pty.openpty()
Same issue is raised when devpts is not mounted, usually in chroots, to mount devpts device type:
devpts
mount -t devpts none /path/to/chroot/dev/pts