Can someone please help me with why I’m getting this error?
This is the code-
Variance spelling is wrong. Correct it and error will be solved.
Hi @yashil2004 along with the spellling of Variance try doing the following change.
In the line 'bound = compute_bounds(history_data, sms_conf.FRAME_SIZE, sms_conf.MUL_FACTOR) , type only ‘conf.FRAME_SIZE,conf.MUL_FACTOR’ instead of adding sms as prefix. See if that helps. Also, two lines below that in ‘required_data_count’ try removing sms as prefix.
Thank you for the help!!!
Hi @adhvayak i put sms as the prefix because i have saved the file name as sms_conf.py…at the very top that’s what i imported too…thanks for pointing out the spelling error!!!
No @adhvayak, it can be seen that @yashil2004 has named his configuration file as sms_conf.py. And it was successfully imported in the code. Otherwise it would have raised an error like unable to import. So the part which you were talking about has been done correctly.
The error was raised only because @yashil2004 mistakenly spelt Variance the second time. So Python was unable to identify the misspelt local variable Varience and raised the error.
The error essentially was : there is no variable named Varience in the function and you have used it to perform an action. Hence, Python is unable to compute the compute_bounds function.
All needed to do is correct the misspelt variable Varience to Variance. That’s it! Nothing more, nothing less. And the above mentioned error will be resolved.