leoBridge save leo file causes AttributeError: 'Commands' object has no attribute 'treeEditFocusHelper'

Bug #1280689 reported by SegundoBob
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
leo-editor
Fix Released
Undecided
Unassigned

Bug Description

The attached python file bt_lbnf.py is a minimal demonstration of this bug. To run bt_lbnf.py:

1) Set the current working directory wherever you want.
2) Insure that newFile.leo does NOT exist in the current working directory.
3) Run bt_lbnf.py. No error occurs.
4) Run bt_lbnf.py a second time. This run error terminates.

Here is the console contents after I did the above:

2014-02-15 15:11:32 /home/ldi/tmp
$ python bt_lbnf.py
file not found: /home/ldi/tmp/newFile.leo. creating new window
2014-02-15 15:11:41 /home/ldi/tmp
$ python bt_lbnf.py

** isPython3: False
Leo 4.11 final, build da72de48efe6 (branch: master), 2014-02-11 09:16:54
Python 2.7.5, leoGui: dummy version
linux2
reading settings in /home/ldi/tmp/newFile.leo
Leo Log Window
Leo 4.11 final, build da72de48efe6 (branch: master), 2014-02-11 09:16:54
Python 2.7.5, leoGui: dummy version
linux2
reading settings in /home/ldi/tmp/newFile.leo
docutils loaded
reading: /home/ldi/tmp/newFile.leo
Traceback (most recent call last):
  File "bt_lbnf.py", line 15, in <module>
    cmdr.save()
  File "/home/ldi/git/leo-editor/leo/core/leoCommands.py", line 1794, in save
    c.fileCommands.save(c.mFileName)
  File "/home/ldi/git/leo-editor/leo/core/leoFileCommands.py", line 1470, in save
    c.endEditing() # Set the current headline text.
  File "/home/ldi/git/leo-editor/leo/core/leoCommands.py", line 8298, in endEditing
    c.frame.tree.endEditLabel()
  File "/home/ldi/git/leo-editor/leo/core/leoFrame.py", line 1906, in endEditLabel
    self.onHeadChanged(p)
  File "/home/ldi/git/leo-editor/leo/core/leoFrame.py", line 1843, in onHeadChanged
    c.treeEditFocusHelper()
AttributeError: 'Commands' object has no attribute 'treeEditFocusHelper'
2014-02-15 15:11:45 /home/ldi/tmp
$
---------
My test system is:
Xubuntu64 13.10
Linux Kernel: 3.11.0-15-generic
Gnome: 3.8.4
Leo 4.11 final, build da72de48efe6 (branch: master), 2014-02-11 09:16:54

Revision history for this message
SegundoBob (bhossley) wrote :
Revision history for this message
Edward K. Ream (edreamleo) wrote : Re: [Bug 1280689] [NEW] leoBridge save leo file causes AttributeError: 'Commands' object has no attribute 'treeEditFocusHelper'

On Sat, Feb 15, 2014 at 5:29 PM, SegundoBob <email address hidden>wrote:

> Public bug reported:
>

  File "/home/ldi/git/leo-editor/leo/core/leoFrame.py", line 1843, in
> onHeadChanged
> c.treeEditFocusHelper()
> AttributeError: 'Commands' object has no attribute 'treeEditFocusHelper'
> 2014-02-15 15:11:45 /home/ldi/tmp
>

​Many thanks for this detailed report. I'll fix this bug immediately.

Edward

Revision history for this message
Edward K. Ream (edreamleo) wrote :

On Sat, Feb 15, 2014 at 5:29 PM, SegundoBob <email address hidden>wrote:

> Public bug reported:
>

​[snip]​

AttributeError: 'Commands' object has no attribute 'treeEditFocusHelper'

​This should be fixed at rev 5f63c36... Please let me know if there are
other problems.

Edward

Revision history for this message
tbnorth (terry-n-brown) wrote :

On Tue, 18 Feb 2014 19:04:58 -0000
"Edward K. Ream" <email address hidden> wrote:

> ​This should be fixed at rev 5f63c36... Please let me know if there
> are other problems.

I think the standard is to quote the first 8 characters, if you only
quote the first seven then you'll be creating confusion every
268,435,455 checkins... as opposed to every 4,294,967,295...

:-)

Cheers -Terry

Revision history for this message
Jake Peck (gatesphere) wrote :

On 2/18/2014 2:25 PM, tbnorth wrote:
> On Tue, 18 Feb 2014 19:04:58 -0000
> "Edward K. Ream" <email address hidden> wrote:
>
>> ​This should be fixed at rev 5f63c36... Please let me know if there
>> are other problems.
> I think the standard is to quote the first 8 characters, if you only
> quote the first seven then you'll be creating confusion every
> 268,435,455 checkins... as opposed to every 4,294,967,295...
>
> :-)
>
> Cheers -Terry
>
Actually the standard is as many as it takes to uniquely identify the
commit :p The linux-kernel project uses 12. Leo needs at least 8, at
the moment:

$ git rev-list --all --abbrev=0 --abbrev-commit | wc -L
8

-->Jake

Revision history for this message
SegundoBob (bhossley) wrote :

Edward,

Thank you. I confirmed that your fix works for me. At the moment I have no other problems.

Changed in leo-editor:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.