2011/11/9 Pierre JUILLARD <pierre.juill...@gmail.com> > Hi, > > I do not succeed using some functions of UnitsAPI. > > For instance, the following code: > > from OCC.UnitsAPI import * > import os > > if __name__ == '__main__': > > os.environ['CSF_CurrentUnitsDefaults']='L:\\programs\\pythonOCC\\0.5\\examples\\data\\unitConfiguration' > > os.environ['CSF_UnitsLexicon']='L:\\programs\\pythonOCC\\0.5\\examples\\data\\unitConfiguration\\Lexi_Expr.dat' > > os.environ['CSF_UnitsDefinition']='L:\\programs\\pythonOCC\\0.5\\examples\\data\\unitConfiguration\\Units.dat' > u = UnitsAPI() > a = u.Dimensions('LENGTH') > > Give the following error message: > > swig/python detected a memory leak of type 'Handle_Units_Dimensions *', no > destructor found. > > Does someone know what this means and how I should bypass this problem, or > even what could be a methodology to track this down? > > I thank you in advance for your help. > Have a good day. > Best regards, > > Pierre > > This exception is raised when swig returns a pointer to an object for which the python wrapper is not loaded (then there's no __del__ method available for this object).
You have to import OCC.Units. Best Regards, Thomas
_______________________________________________ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users