Philip Jackson

Philj

About Me

Connect

LOCATION
Not Specified
WEBSITE

Houdini Skills

Availability

Not Specified

Recent Forum Posts

Using command chain with existing xmlrpc server Dec. 14, 2020, 11:35 p.m.

Hi Chris, thanks I had a go at running the genericrpc.py and I was getting the same error.

BUT

Ive had a second think about why im even using a command chain. I can set up my own server and run functions using xmlrpc in plain old "python script" top nodes which seems to be working.

Using command chain with existing xmlrpc server Dec. 11, 2020, 11:31 p.m.

Hi Im trying to use houdinis command chain with an existing xmlrpc server that Im running outside of houdini. I might be misunderstanding how it all works!

Im starting with the example here -
https://docs.python.org/3/library/xmlrpc.server.html#module-xmlrpc.server [docs.python.org]
from xmlrpc.server import SimpleXMLRPCServer
from xmlrpc.server import SimpleXMLRPCRequestHandler

class RequestHandler(SimpleXMLRPCRequestHandler):
    rpc_paths = ('/RPC2',)

with SimpleXMLRPCServer(('localhost', 8000),
                        requestHandler=RequestHandler) as server:
    server.register_introspection_functions()

    # Register pow() function; this will use the value of
    # pow.__name__ as the name, which is just 'pow'.
    server.register_function(pow)

    # Register a function under a different name, using
    # register_function as a decorator. *name* can only be given
    # as a keyword argument.
    @server.register_function(name='add')
    def adder_function(x, y):
        return x + y

    # Register a function under function.__name__.
    @server.register_function
    def mul(x, y):
        return x * y

    server.serve_forever()

It works great! I can connect to it outside of houdini and run the example functions. all good.

I can also connect to this(external to houdini) server in tops using a python command chain using the "connect to existing server" option.

As soon as I add a "send command" top to this command chain I get the following error-
Error running callback 'onCookTask': sharedserver info is invalid for name 'localscheduler/sharedsever0'

Traceback (most recent call last):
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.287/houdini/pdg/types\utils\commandchain.py", line 205, in onCookTask
raise pdg.CookError("sharedserver info is invalid for name '{}'".format(server_name))
CookError: sharedserver info is invalid for name 'localscheduler/sharedsever0'

I dont understand what is happening here. This happens even if the send command is blank.

Making a blocking task that waits for input from a human Dec. 10, 2020, 6:56 p.m.

Thanks Jeff! I put the hou.ui.displayMessage inside a python script top and that gives exactly what I want.