First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
1 | initial version |
You can run your program and cause warning to be raised as exceptions by doing the following:
python -W error program.py
alternately, put this at the top of your code:
warnings.simplefilter("error")
That way a nice stack trace is generated and you can see which call(s) are causing the problem.
Refer to the warnings documentation for more details, including how your could just ignore printing the warnings if you find that's the best way to resolve your problem.
2 | No.2 Revision |
You can run your program and cause warning to be raised as exceptions by doing the following:
python -W error program.py
alternately, put this at the top of your code:
warnings.simplefilter("error")
That way a nice stack trace is generated and you can see which call(s) are causing the problem.
Refer to the warnings documentation for more details, including how your could just ignore suppress printing the warnings if you find that's the best way to resolve your problem.
3 | No.3 Revision |
You can run your program and cause warning to be raised as exceptions by doing the following:
python -W error program.py
alternately, put this at the top of your code:
import warnings
warnings.simplefilter("error")
That way a nice stack trace is generated and you can see which call(s) are causing the problem.
Refer to the warnings documentation for more details, including how your could just suppress printing the warnings if you find that's the best way to resolve your problem.