1

I debug a project and I get a scary warning somewhere in it:

../opt/anaconda3/envs/myenv/lib/python3.6/site-packages/numpy/core/_methods.py:26: RuntimeWarning: invalid value encountered in reduce
  return umr_maximum(a, axis, None, out, keepdims)

Pycharm allows to stop at a exception through setting exception breakpoint, as document says. I tried and it didn't work for warning (I assume warning is not Exception)!

Is there a way for me to stop when this warning raises and see what's going on?

Ehsan Sh
  • 227
  • 2
  • 8
  • you can turn warnings into errors by setting `PYTHONWARNINGS=error` (environment variable) or `-W error` on the commandline (if you have access to that) – anthony sottile Aug 05 '21 at 03:23
  • Thanks a lot @AnthonySottile . And how can I revert it back?! If I couldn't resolve it I don't want to be hindered by it! I think I found the solution [https://stackoverflow.com/questions/6877727/how-do-i-delete-an-exported-environment-variable]. Thanks! – Ehsan Sh Aug 05 '21 at 03:41
  • undo whatever you did? – anthony sottile Aug 05 '21 at 12:58

0 Answers0