[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Warnings
"Ian Mallett" <geometrian@xxxxxxxxx> wrote:
> Hi,
> After I compile my program with py2exe, and run it, there are warnings;
> like
> "DeprecationWarning: integer argument expected, got float". These are
> just
> warnings, but upon exiting my program a window pops up saying to see the
> log
> file. The log file lists the warnings. Sometimes the window crashes the
> game before it has a chance to exit. In short, I would like to get rid of
> the window, as no one needs to see it. ]
I have found that it is usually not difficult to find the causes of the
warnings and cast the float arguments to ints - correcting the problem,
rather than masking the symptoms.
This is probably an especially good idea if I read the implication of the
warnings correctly - it is currently deprecated to pass a float in to this
function, but in the future, it won't be a warning, it'll be an error. If
so, and if you plan to maintain the code you're working on, you'll have to
call the complaining function with integer arguments anyway.
-Dave LeCompte