trying to control csound with pyro

Richard van Bemmelen <[email protected]> Wed, 4 Dec 2013 19:05:42 +0100
Newsgroups gmane.comp.python.pyro
Message-ID <CAMEWXj1z3Ern+m4OhYdKYXX5LZyvqmbnfXbLzZYvk7poSof10w@mail.gmail.com>
I have a simple csound server, that I want to control with pyro, that is
start(), stop(), send new instruments etc.

When I try to send an instrument (just a string) I get:

Traceback (most recent call last):
  File "/Users/richard/Desktop/MyPython/CsClient.py", line 24, in <module>
    cs.score(str(sco2))
  File
"/Library/Python/2.7/site-packages/Pyro4-4.22-py2.7.egg/Pyro4/core.py",
line 160, in __call__
    return self.__send(self.__name, args, kwargs)
  File
"/Library/Python/2.7/site-packages/Pyro4-4.22-py2.7.egg/Pyro4/core.py",
line 318, in _pyroInvoke
    raise data
TypeError: in method 'CsoundPerformanceThread_InputMessage', argument 2 of
type 'char const *'
logout

client code:

cs.score(sco2)

server code:

def score(self, scor):
self.csPerfThread.InputMessage(scor)


I got it working by specifically changing the InputMessage argument to a
string, like:
                self.csPerfThread.InputMessage(str(scor))

but why do I have to do that?

Richard

------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk

_______________________________________________
Pyro-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyro-core