This code below runs fine on my macOS 10.15.6. However, when I deployed the code on an Ubuntu 20.04-server I\'m getting
OSError: [Errno 9] Bad file descriptor