I was working with Leo + IPython (latest from bzr) and pushing expressions
to IPython using Alt-i and I start getting these messages:

AttributeError: Commands instance has no attribute 'frame'
exception executing command
Traceback (most recent call last):
  File "/home/kayvan/src/leo/leo/src/leoCommands.py", line 286, in doCommand
    val = command(event)
  File "/home/kayvan/src/leo/leo/plugins/ipython.py", line 252, in 
pushToIPythonCommand
    self.pushToIPython(script=None)
  File "/home/kayvan/src/leo/leo/plugins/ipython.py", line 277, in pushToIPython
    push(p)
  File "/home/kayvan/src/ipython/IPython/Extensions/ipy_leo.py", line 446, in 
push_position_from_leo
    push_from_leo(LeoNode(p))
  File "/home/kayvan/src/ipython/IPython/hooks.py", line 135, in __call__
    ret = cmd(*args, **kw)
  File "/home/kayvan/src/ipython/IPython/Extensions/ipy_leo.py", line 371, in 
push_ipython_script
    c.beginUpdate()
  File "/home/kayvan/src/leo/leo/src/leoCommands.py", line 5769, in beginUpdate
    if c.frame and c.frame.tree:
AttributeError: Commands instance has no attribute 'frame'

I realized that the problem was due to opening multiple Leo files.

Here is a sequence of events that reproduces this every time:

1) Open foo.leo
2) Alt-Shift-I to open ILeo console
3) Alt-i to push expressions from foo.leo to ipython
4) Open foo2.leo 
5) Alt-i to push expressions from foo2.leo to ipython
6) Close foo.leo (the original pane that started ipython)
7) Alt-i to push expressions from foo2.leo to ipython

Result: The above traceback.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to