Skip to content

Using set_trace in 0.9.1 raises an error #93

@asfaltboy

Description

@asfaltboy

A simple call into ipdb.set_trace(), which is confirmed to work in versions 0.9 and 0.8, fails as below. This may be related to the fix in #85.

AttributeError: "'NoneType' object has no attribute 'shell'"
*** SyntaxError: invalid syntax (<stdin>, line 1)
> /Users/big/dev/test_trace.py(2)test_something()
      1 def test_something():
----> 2     import ipdb; ipdb.set_trace()
      3     print("test")

ipdb> c
Traceback (most recent call last):
  File "test_trace.py", line 5, in <module>
    test_something()
  File "test_trace.py", line 2, in test_something
    import ipdb; ipdb.set_trace()
  File "/Users/big/.venvs/test/lib/python2.7/site-packages/ipdb/__main__.py", line 133, in set_trace
    p.shell.restore_sys_module_state()
AttributeError: 'NoneType' object has no attribute 'shell'

If you suspect this is an IPython bug, please report it at:
    https://github.com/ipython/ipython/issues
or send an email to the mailing list at ipython-dev@scipy.org

You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.

Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
    %config Application.verbose_crash=True

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions