I keep getting this :
DeprecationWarning: integer argument expected, got float
How do I make this message go away? Is there a way to avoid warnings in Python?
I keep getting this :
DeprecationWarning: integer argument expected, got float
How do I make this message go away? Is there a way to avoid warnings in Python?
None of these answers worked for me so I will post my way to solve this. I use the following
at the beginning of my main.py
script and it works fine.Use the following as it is (copy-paste it):
I found the cleanest way to do this (especially on windows) is by adding the following to C:\Python26\Lib\site-packages\sitecustomize.py:
Note that I had to create this file. Of course, change the path to python if yours is different.
From documentation of the
warnings
module:If you're on Windows: pass
-W ignore::DeprecationWarning
as an argument to Python. Better though to resolve the issue, by casting to int.(Note that in Python 3.2, deprecation warnings are ignored by default.)