Home Help Center

Python loadSlice import module issue

spsonispsoni Member Sury P SoniOrganization: Next DigitalProject: Unified Messaging Plattform for Inhouse Products ✭✭
Hi,

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:

http://www.zeroc.com/doc/Ice-3.3.1/manual/Python.23.15.html#82679

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

Please advice.

Comments

  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi,

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

    Regards,
    Mark
  • spsonispsoni Member Sury P SoniOrganization: Next DigitalProject: Unified Messaging Plattform for Inhouse Products ✭✭
    In the attached example.

    If you execute each python source (mod1.py, mod2.py and test.py). 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.

    Cheers.

    Surya
  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi,

    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.

    Thanks,
    Mark
Sign In or Register to comment.