ThreadPoolServer spams warning logs #91

oliverdrake opened this Issue Jul 30, 2012 · 2 comments


None yet

2 participants


I get endless warning logs from my server if I use ThreadPoolServer on Ubuntu 11.10 amd64 as soon as I connect with a single client. To reproduce:

Server side:

import rpyc
from rpyc.utils.server import ThreadPoolServer
import logging

class MyService(rpyc.Service):

    def on_connect(self):
        # code that runs when a connection is created
        # (to init the serivce, if needed)

    def on_disconnect(self):
        # code that runs when the connection has already closed
        # (to finalize the service, if needed)

    def exposed_get_answer(self): # this is an exposed method
        return 42

    def get_question(self):  # while this method is not exposed
        return "what is the airspeed velocity of an unladen swallow?"

t = ThreadPoolServer(MyService, port=18867)

Client side:

from rpyc.utils.factory import connect
c = connect("ip address", 18867)

Once the connection is established the server will start spamming the following log message:

WARNING:MY/18867:failed to poll clients, caught exception : 'int' object is not iterable

My setup:
uname -a
Linux WS3232 3.0.0-17-generic #30-Ubuntu SMP Thu Mar 8 20:45:39 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
python --version
Python 2.7.2+


ThreadPoolServer expects poll() to return a list of tuples, which it does if SelectingPoll is used, but if PollingPoll is used we only get a list of integers. I managed to make ThreadPoolServer stop complaining by hacking the following into, line 119:

processed.append((fd, mask))

instead of:


Thanks for the quick response :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment