2

I am trying to run a script in a Jupyter Notebook in debug mode with the magic %run -d "/home/dev/filename.py".

I receive error : AttributeError: 'NoneType' object has no attribute 'f_globals' when doing so.

This would happen with filename.py containing only print("hello world). The script itself is irrelevant and the error happens on calling the magic.

To be clear the code that produces the error is the magic %run -d itself. You can try to reproduce it in a Jupyter Notebook with any script. For me any script returns that error.

Anyone has experienced the same? Any idea what is happening?

3
  • 1
    Don't you think it might be useful to post the code that produces this error (in the form of a minimal reproducible example)? Commented Jan 8, 2017 at 22:33
  • @TigerhawkT3 For the purpose of example, this would happen with filename.py containing only print("hello world). The script itself is irrelevant and the error happens on calling the magic. Commented Jan 8, 2017 at 22:36
  • @TigerhawkT3 To be clear the code that produces the error is the magic %run -d itself. You can try to reproduce it in a Jupyter Notebook with any script. For me any script returns that error. Commented Jan 8, 2017 at 22:40

1 Answer 1

1

Ok I found it: https://github.com/ipython/ipython/pull/10030 https://github.com/takluyver/ipython/commit/6b1960d811d25e8f754324259a5b4fd59f8f8162

I t was a bug in the Ipython file that i had to manually edit. Not the easiest for a newbie :S.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.