Syntax error sending string to XMLRPC daemon

Hi Forum,

I’m attempting to send three pieces of information to a JSON via an XMLRPC python Daemon as follows:

// In program node
writer.appendLine("    info = \"{'index': json_index, 'pose': 'current_pose', 'uid': " + nodeID + "}\"");
writer.appendLine("    send_pose(info)");

// In installation node
writer.assign(XMLRPC_VARIABLE, "rpc_factory(\"xmlrpc\", \"" + XmlRpcMyInterface.getDaemonUrl() + "\")");
writer.appendLine("global json_index = 0");
writer.appendLine("def send_pose(info):");
writer.appendLine(" global json_index");
// originally next line had no "tmp = ", I chucked it in to see if anything changed
writer.appendLine(" tmp = " + XMLRPC_VARIABLE + ".register_info(info)");
writer.appendLine(" json_index = json_index + 1");
writer.appendLine(" if (json_index > 999) json_index = 0");
writer.appendLine("end");

// In XML interface
public boolean register_info(String info) throws XmlRpcException, UnknownResponseException {
  Object response = XML_RPC_CLIENT.execute("register_info", Collections.singletonList(info));
  if (response instanceof Boolean) {
    return (Boolean) response;
  } else {
    throw new UnknownResponseException();
  }
}

// In python daemon
def register_info(info_str):
  etc...

When I try run my program node in Polyscope I get a syntax error in the installation node on the line where register_info is called.

Screenshot 2026-01-16 at 4.16.37 PM

I was trying to follow this thread’s advice when I set up my implementation.

Any clues? Thanks

I should add, I’ve tested just passing in a regular string, which resulted in the same error.

I’ve solved the issue by moving my global index incrementation out of the installation function and into the program node. I don’t know why this has seemed to fix the issue.