Exit code 1 Exception ignored on flushing sys.stdout: OSError: [Errno 22] Invalid argument