Home Help Center

Printer example

akus85akus85 Member Nunzio Alberto FavaroOrganization: PersonalProject: Try it
Hi,
i'm a newbie in Ice,my problem is in Printer example in fact when i launch Client.py i receive this error :
Traceback (most recent call last):
File "Client.py", line 13, in <module>
printer.printString("Hello World!")
File "/home/akus/Desktop/Ice/Printer_ice.py", line 46, in printString
return _M_Demo.Printer._op_printString.invoke(self, (s, ), _ctx)
TypeError: function takes exactly 2 arguments (3 given)

For clarity i attach my source code. :o

Thanks in advance

Comments

  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Welcome to the forum!

    Is it possible that you're using two different versions of Ice? The generated code (Printer_ice.py) shows version 3.2.1, but your error message indicates that you are using a newer version of the Python extension. I recommend checking your PATH to make sure that you're not using an obsolete version of slice2py.

    Note that you can determine the Ice version of a Slice compiler using the -v option:

    > slice2py -v
    3.3.1

    Regards,
    Mark
  • akus85akus85 Member Nunzio Alberto FavaroOrganization: PersonalProject: Try it
    I'm using python 2.5.4 , slice2py 3.2.1 and Ice 3.3.1-6 :rolleyes:
Sign In or Register to comment.