[issue27749] multprocessing errors on Windows: WriteFile() argument 1 must be int, not None; OSError: handle is closed

Michael Jacob report at bugs.python.org
Thu Jan 31 08:36:04 EST 2019


Michael Jacob <jacob at j-e-b.net> added the comment:

So, I'm experiencing the issue in the title, too. The pipe handle stays valid for between 5 and 60 minutes, then it goes None when written to.

I'm far from understanding that code, but this crude re-connect code seems to solve the issue for me:

In BaseProxy._callmethod, I changed:

        conn.send((self._id, methodname, args, kwds))

to:

        try:
            conn.send((self._id, methodname, args, kwds))
        except TypeError:
            self._connect()
            conn = self._tls.connection
            conn.send((self._id, methodname, args, kwds))

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue27749>
_______________________________________


More information about the Python-bugs-list mailing list