7

I am using ipdb to debug my python like below:

python -m ipdb my_test.py -d my_input_config -o my_output

and got the following errors:

/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py:125: RuntimeWarning: 'ipdb.__main__' found in sys.modules after import of package 'ipdb', but prior to execution of 'ipdb.__main__'; this may result in unpredictable behaviour
  warn(RuntimeWarning(msg))

What does this mean and how do I fix this? Thank you!

Edamame
  • 23,718
  • 73
  • 186
  • 320
  • 1
    see [here](https://stackoverflow.com/questions/43393764/python-3-6-project-structure-leads-to-runtimewarning) – pansila Mar 22 '19 at 04:55
  • 1
    https://stackoverflow.com/a/60922965/3990998 This might be useful – Madalosso Apr 08 '21 at 11:41
  • Typing `__spec__ = None` as soon as `ipdb` starts up seems to solve the "unpredictable" behavior (like the link above says) but it'd be nice to know why this happens and how to solve it without that workaround. – user1717828 Aug 22 '22 at 21:00

0 Answers0