> On Dec 14, 2013, at 19:14, Petrus Hyvönen <petrus.hyvo...@gmail.com> wrote: > > Hi, > > I'm having a problem with I think might be related to generic types, but not > sure at all. > > I'm wrapping a orbit calculation library, which has been working well but in > latest version is using generic types and I'm getting some problems. The > script works when executed in plain python, but fails in ipython notebook on > this last line when executed as a couple of cells.
What is an 'ipython notebook' ? Andi., > > The section with problem in my script is: > elDetector = > ElevationDetector(sta1Frame).withConstantElevation(math.radians(5.0)) > elDetector = elDetector.withHandler(ContinueOnEvent().of_(ElevationDetector)) > > In Java it would typically look something like: > > ElevationDetector detector = new ElevationDetector(topo) > .withConstantElevation(x) > .withHandler(new > ContinueOnEvent<ElevationDetector>()); > > It produces correct results in plain python, but crashes the kernel in > ipython if executed as cells, and in exection from spyder I get an error > message: > > " elDetector = > elDetector.withHandler(ContinueOnEvent().of_(ElevationDetector)) > AttributeError: 'str' object has no attribute 'wrapfn_' " > > As I have been using this setup stabely with lots of other functions it feels > like there is something with the generic type line, but I don't really know > how to get any further? I'm confused by that the pauses in the execution > could seem to affect the result. > > Any comments highly appriciated... > > Best Regards > /Petrus >