0

I am trying to run the remote manager example code from the multiprocessing documentation in pypy3 but I get an error connecting the client.

Traceback (most recent call last):  
  File "C:/temp/testpypy/mp_client.py", line 7, in <module>
  m.connect()
  File "C:\Python\pypy3-v6.0.0-win32\lib-python\3\multiprocessing\managers.py", line 455, in connect
    conn = Client(self._address, authkey=self._authkey)
  File "C:\Python\pypy3-v6.0.0-win32\lib-python\3\multiprocessing\connection.py", line 493, in Client
    answer_challenge(c, authkey)
  File "C:\Python\pypy3-v6.0.0-win32\lib-python\3\multiprocessing\connection.py", line 732, in answer_challenge
    message = connection.recv_bytes(256)         # reject large message
  File "C:\Python\pypy3-v6.0.0-win32\lib-python\3\multiprocessing\connection.py", line 216, in recv_bytes
    buf = self._recv_bytes(maxlength)
  File "C:\Python\pypy3-v6.0.0-win32\lib-python\3\multiprocessing\connection.py", line 407, in _recv_bytes
    buf = self._recv(4)
  File "C:\Python\pypy3-v6.0.0-win32\lib-python\3\multiprocessing\connection.py", line 386, in _recv
    buf.write(chunk)
TypeError: 'str' does not support the buffer interface

if I try to connect to it from a CPython interpreter (which is my ultimate goal) I get the following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "c:\Python\3.5.4.2\WinPython\python-3.5.4.amd64\lib\multiprocessing\managers.py", line 455, in connect
     conn = Client(self._address, authkey=self._authkey)
  File "c:\Python\3.5.4.2\WinPython\python-3.5.4.amd64\lib\multiprocessing\connection.py", line 493, in Client
     answer_challenge(c, authkey)
  File "c:\Python\3.5.4.2\WinPython\python-3.5.4.amd64\lib\multiprocessing\connection.py", line 737, in answer_challenge
     response = connection.recv_bytes(256)        # reject large message
  File "c:\Python\3.5.4.2\WinPython\python-3.5.4.amd64\lib\multiprocessing\connection.py", line 218, in recv_bytes
     self._bad_message_length()
  File "c:\Python\3.5.4.2\WinPython\python-3.5.4.amd64\lib\multiprocessing\connection.py", line 151, in _bad_message_length
     raise OSError("bad message length")
OSError: bad message length
Techniquab
  • 843
  • 7
  • 22

1 Answers1

0

Turns out to be a bug in PyPy3.

Here is the fixed ticket: https://bitbucket.org/pypy/pypy/issues/2841/remote-multprocessing-issue#comment-45861347

Techniquab
  • 843
  • 7
  • 22