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

Python loadSlice import module issue


I am using python loadSlice function to import different slice definition in different python modules.

Somehow, in one of the module, I am able to get the checkedCast proxy object from other module, but I cannot access interface functions through proxy object.

I am getting following error:
AttributeError: 'DBNodePrx' object has no attribute 'put'

Where DBNode is interface and put is the interface operation.

Whereas, just before put operation on that proxy object, if I print that object, i can see proper proxy string.

I suspect, I am encountering problem similar to:

But, this is still strange, if I am able to return proper proxy, why not the attributes?

Please advice.


  • mes
    mes California

    It would be much easier for us to investigate this issue if you could provide a small example that demonstrates the problem.

  • In the attached example.

    If you execute each python source (, and You will see different results.

    Ideally, I would like loadSlice to update the module, rather than overwrite the module (Demo, in the attached example).

    I hope, with attached example, I express my doubts clearly.

    As, my application is growing and I use same module name in different slice definitions and when I loadSlice from different modules, I actually overstep and get undesirable results as expressed through attached example.

    Please suggest work around this problem.

    Let me know, if you need further information.


  • mes
    mes California

    I ran your examples on RHEL5 with Python 2.4.3 and I got the results that I expected. Can you explain in more detail what you think is wrong here?

    Also, please provide the versions of your operating system, Ice, and python.