This forum has been archived. Please start a new discussion on GitHub.

Problems with IceGrid Client developed in wxpython

I want to develop an IceGrid client with wxpython. And I modified some code in the demopy/simple. Here is the function to init Ice
def _InitIcePrx(self):
        self.helloPrx = None
        communicator = Ice.initialize()
            self.helloPrx = Demo.HelloPrx.checkedCast(communicator.\
        except Ice.NotRegisteredException:
            query = IceGrid.QueryPrx.checkedCast(communicator.\
            self.helloPrx = Demo.HelloPrx.checkedCast(query.\
        if not self.helloPrx:
I only changed the method to get communicator from Ice.Application to Ice.initialize() and all the other config files were the same as the demo's. However when I ran I got this error:
Ice.NoEndpointException: exception ::Ice::NoEndpointException
proxy = hello -t
Does this happened because I did not pass the "config.client" parameter to my application? And could someone please tell me how to include that config file in my wxpython application, since the structure of mine is different from the demo. All my code is in the attachment mainfrmcode.txt. Thank you very much!


  • benoit
    benoit Rennes, France

    You need to setup the Ice.Default.Locator property in your code if you don't want to rely on configuration files. Something like the following should do the job:
    initData = Ice.InitializationData() = Ice.createProperties()'Ice.Default.Locator', 'DemoIceGrid/Locator:default -h localhost -p 4061')
    communicator = Ice.initialize(initData)

    If you're developing a GUI, the instance name, host and port information of the IceGrid registry will typically be provided by the user through a dialog.

  • Thanks to Benoit Foucher

    Thanks very much for your reply, Benoit Foucher. I have tried and it really worked!
    Sorry to bother you about my question, for I did not understand the procedure of coding IceGrid Applications very well.