Python Forum

Full Version: object cannot be interpreted as an integer
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I am a beginner programmer working on a Python project. - Using Python 3.6 and Windows 10
I need help interpreting this error message before taking too many guesses at what might be the root of the problem. I suppose the root of the problem is that I don't know what the error message is referring to with the word "object". I know what an integer is. But, I have no idea as to why
there is reference to an "integer". These variables being used here are not integers. There are lots of lines of code in the module, but here
I supply a small bit of the code(starting with line 182). Then below is the error message. Any pointes will be appreciated.

Thanks!

if (count<20):
    summary1="too few samples"
elif (tBias<TBLimNineFivePct and tslope<TSLimNineFivePct and SEP<(AppNoteSEP*faccuracynintyfivepct)):
    summary1="PASS"
elif ((tBias>TBLimNineFivePct or abs(Bias)*2.5>tBias) and tslope<TSLimNineFivePct and SEP<(AppNoteSEP*faccuracynintyfivepct)):
    summary1=("Bias adjustment is recommended. Add ",Bias," to existing Bias for a new Bias setting of:",newBias)  
elif (tBias>TBLimNineFivePct or SEP(AppNoteSEP*faccuracynintyfivepct)):
    summary1="Calibration update is recommended"
Error:
Traceback (most recent call last): File "C:\Users\3135\eclipse-workspace\NIR Automated Validation\soynirvalidation.py", line 186, in <module> elif ((tBias>TBLimNineFivePct or abs(Bias)*2.5>tBias) and tslope<TSLimNineFivePct and SEP<(AppNoteSEP*faccuracynintyfivepct)): TypeError: 'numpy.float64' object cannot be interpreted as an integer
use type() to find the culprit