cos: "Integer Required"?!?!?!?

moonman iant at the-wire.com
Thu Jun 8 12:00:20 EDT 2006


I'm using ActiveState PythonV2.4.1

I'm certainly not affecting 'math'. I wonder if the XPlane SDK Python
binding is touching anything.

I'll download the latest ActiveState Python and keep on plugging.

Thanks!


Mikael Olofsson wrote:
> moonman wrote:
> > print self.ACphi, type(self.ACphi) yields:
> > 19412557 <type 'int'>
> >
> > value = XPLMGetDataf(self.ACphi); print value  type(value ) yields:
> > -0.674469709396 <type 'float'>
> >
> > print math.radians(XPLMGetDataf(self.ACphi)),
> > type(math.radians(XPLMGetDataf(self.ACphi))) yields:
> >
> > TypeError
> > :
> > an integer is required
> >
> > Am I totally missing something about 'math'. Does it really expect an
> > int?
>
> Not my Python:
>
>  >>> math.radians(-0.674469709396)
> -0.011771717133929535
>
> This all seems very confusing. Have you tried exactly the above?
>
> Do you perhaps have a module of your own called math, that Python might
> be importing? Or is your math not a module, but some other object that
> happens to have a method called radians, that expects an int? Or have
> you accidentally redefined math.radians?
> 
> /MiO




More information about the Python-list mailing list