[omniORB] omniORBpy Exception exceptions.AttributeError

Duncan Grisby duncan at grisby.org
Tue Apr 28 18:18:35 BST 2009


On Monday 27 April, Kyle Dunn wrote:

> I am attempting to resolve two references to different CORBA C++ servants
> using the following code:

[...]
>         client = cameraObj._narrow(gri._objref_Camera)

This is wrong. _objref_Camera is a private implementation detail of
omniORBpy. You should not refer to it.

The correct code is

         client = cameraObj._narrow(gri.Camera)

Also, it's not generally a good idea to do a catch-all except statement,
because it's easy to accidentally mask errors without seeing what they
are. I'd suggest catching CORBA.Exception or CORBA.SystemException and
printing the exception out.

[...]
> Problem resolving Panorama object name in initCorbaOrb().panoramaClientInit()
> Exception exceptions.AttributeError: "_objref_Panorama instance has no
> attribute '_Object__release'" in <bound method _objref_Panorama.__del__ of
> <gri._objref_Panorama instance at 0xb79e3c6c>> ignored

I'm not sure why that's happening. Removing the catch-all except might
help by revealing what the exception was.

Do the omniORBpy echo examples work for you?  If not, there's something
fundamentally wrong with your omniORBpy build. If they do work, the
problem is something related to what your code is doing. Please create a
minimal example of your code that shows the problem and post the
complete thing.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --



More information about the omniORB-list mailing list