Leo 4.6.1 released

5 views
Skip to first unread message

Edward K. Ream

unread,
Jul 30, 2009, 12:37:40 PM7/30/09
to leo-editor
Leo 4.6.1 final is now available at:
http://sourceforge.net/project/showfiles.php?group_id=3458&package_id=29106

Leo 4.6.1 fixes several minor bugs in Leo 4.6. It is based on the
present trunk.

No further 4.6.x releases are planned.

Edward

Matt Wilkie

unread,
Jul 30, 2009, 1:32:31 PM7/30/09
to leo-e...@googlegroups.com
> Leo 4.6.1 final is now available

Thank you Edward, Ville and everyone else who contributes to keeping
leo a vibrant project. Your efforts are appreciated. :)

Tip for windows users who don't want to change their shortcuts with
every release, and still retain the release number on extracted
folder:

1. unpack leo-x.x.x.zip to %pythonpath%\lib\site-packages
2. Create a "Junction Link" from
%pythonpath%\lib\site-packages\leo-x.x.x to .\leo
3. Set leo shortcut to %pythonpath%\lib\site-packages\leo (and leave
it there evermore)

The program I like for creating junctions is LinkShellExtension -
http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html -
not open source but has a fairly liberal use license, even in
commercial settings.

NTFSLink is open source, but doesn't work on 64bit machines -
http://elsdoerfer.name/=ntfslink


cheers,
--
-matt

Ville M. Vainio

unread,
Jul 30, 2009, 1:51:33 PM7/30/09
to leo-e...@googlegroups.com
On Thu, Jul 30, 2009 at 7:37 PM, Edward K. Ream<edre...@gmail.com> wrote:

The debian/ubuntu package is also ready:

http://ppa.launchpad.net/villemvainio/ppa/ubuntu/pool/main/l/leo/leo_4.6.1-1_all.deb

Please upload that to sourceforge as well.

And don't neglect the opportunity to announce at the blog ;-).

--
Ville M. Vainio
http://tinyurl.com/vainio

stephen_b

unread,
Jul 30, 2009, 3:37:06 PM7/30/09
to leo-editor
I am unable to open my main .leo file with 4.6.1 (using the qt plugin,
although the message seems to be Tk related. I can open smaller leo
files):

Exception AttributeError: "TkPickleVar instance has no attribute
'_tk'" in <bound method TkPickleVar.__del__ of <cleo.TkPickleVar
instance at 0x0250D558>> ignored
Exception AttributeError: "TkPickleVar instance has no attribute
'_tk'" in <bound method TkPickleVar.__del__ of <cleo.TkPickleVar
instance at 0x0250D0F8>> ignored

There are also a bunch of these, but it doesn't look like the issues
are related:
Traceback (most recent call last):
File "C:\Python26\Lib\site-packages\Leo-4-6-1-final\leo\plugins
\qtGui.py", line 7285, in eventFilter
gui.onDeactivateEvent(event,c,obj,self.tag)
AttributeError: nullGui instance has no attribute 'onDeactivateEvent'

That is the short version. When I try passing the file name to
launchLeo.py, I get that issue plus more:

C:\Program Files\Leo-4-6-1-final>python launchLeo.py d:\Data\myusername
\programming\python\pythoncode\python.leo
Exception AttributeError: "TkPickleVar instance has no attribute
'_tk'" in <bound method TkPickleVar.__del__ of <cleo.TkPickl
eVar instance at 0x01B9A350>> ignored
Traceback (most recent call last):
File "launchLeo.py", line 8, in <module>
leo.core.runLeo.run()
File "C:\Program Files\Leo-4-6-1-final\leo\core\runLeo.py", line 88,
in run
fn,relFn,script = doPrePluginsInit(fileName,pymacs)
File "C:\Program Files\Leo-4-6-1-final\leo\core\runLeo.py", line
116, in doPrePluginsInit
g.app.config.readSettingsFiles(fileName,verbose)
File "C:\Program Files\Leo-4-6-1-final\leo\core\leoConfig.py", line
1873, in readSettingsFiles
c = self.openSettingsFile(path)
File "C:\Program Files\Leo-4-6-1-final\leo\core\leoConfig.py", line
1900, in openSettingsFile
theFile,path,readAtFileNodesFlag=False,silent=True) # closes
theFile.
File "C:\Program Files\Leo-4-6-1-final\leo\core\leoFileCommands.py",
line 935, in open
silent=silent)
File "C:\Program Files\Leo-4-6-1-final\leo\core\leoFileCommands.py",
line 772, in getLeoFile
ok = self.getLeoFileHelper(theFile,fileName,silent)
File "C:\Program Files\Leo-4-6-1-final\leo\core\leoFileCommands.py",
line 809, in getLeoFileHelper
v = self.readSaxFile
(theFile,fileName,silent,inClipboard=False,reassignIndices=False)
File "C:\Program Files\Leo-4-6-1-final\leo\core\leoFileCommands.py",
line 1561, in readSaxFile
children = self.createSaxVnodes
(saxRoot,reassignIndices=reassignIndices)
File "C:\Program Files\Leo-4-6-1-final\leo\core\leoFileCommands.py",
line 1127, in createSaxVnodes
children = self.createSaxChildren(saxRoot,parent_v=parent_v)
File "C:\Program Files\Leo-4-6-1-final\leo\core\leoFileCommands.py",
line 1143, in createSaxChildren
v = self.createSaxVnodeTree(child,parent_v)
File "C:\Program Files\Leo-4-6-1-final\leo\core\leoFileCommands.py",
line 1159, in createSaxVnodeTree
self.createSaxChildren(sax_node,v)
File "C:\Program Files\Leo-4-6-1-final\leo\core\leoFileCommands.py",
line 1143, in createSaxChildren
v = self.createSaxVnodeTree(child,parent_v)
File "C:\Program Files\Leo-4-6-1-final\leo\core\leoFileCommands.py",
line 1159, in createSaxVnodeTree
self.createSaxChildren(sax_node,v)
File "C:\Program Files\Leo-4-6-1-final\leo\core\leoFileCommands.py",
line 1143, in createSaxChildren
v = self.createSaxVnodeTree(child,parent_v)
File "C:\Program Files\Leo-4-6-1-final\leo\core\leoFileCommands.py",
line 1159, in createSaxVnodeTree
self.createSaxChildren(sax_node,v)
File "C:\Program Files\Leo-4-6-1-final\leo\core\leoFileCommands.py",
line 1143, in createSaxChildren
v = self.createSaxVnodeTree(child,parent_v)
File "C:\Program Files\Leo-4-6-1-final\leo\core\leoFileCommands.py",
line 1159, in createSaxVnodeTree
self.createSaxChildren(sax_node,v)
File "C:\Program Files\Leo-4-6-1-final\leo\core\leoFileCommands.py",
line 1143, in createSaxChildren
v = self.createSaxVnodeTree(child,parent_v)
File "C:\Program Files\Leo-4-6-1-final\leo\core\leoFileCommands.py",
line 1157, in createSaxVnodeTree
v = self.createSaxVnode(sax_node,parent_v)
File "C:\Program Files\Leo-4-6-1-final\leo\core\leoFileCommands.py",
line 1197, in createSaxVnode
self.handleVnodeSaxAttributes(sax_node,v)
File "C:\Program Files\Leo-4-6-1-final\leo\core\leoFileCommands.py",
line 1303, in handleVnodeSaxAttributes
aDict = self.getDescendentUnknownAttributes(s)
File "C:\Program Files\Leo-4-6-1-final\leo\core\leoFileCommands.py",
line 1018, in getDescendentUnknownAttributes
val = pickle.loads(bin)
File "C:\Python26\lib\pickle.py", line 1374, in loads
return Unpickler(file).load()
File "C:\Python26\lib\pickle.py", line 858, in load
dispatch[key](self)
File "C:\Python26\lib\pickle.py", line 1217, in load_build
setstate(state)
File "C:\Program Files\Leo-4-6-1-final\leo\plugins\cleo.py", line
129, in __setstate__
Tk.Variable.__init__(self)
File "C:\Python26\lib\lib-tk\Tkinter.py", line 182, in __init__
self._tk = master.tk
AttributeError: 'NoneType' object has no attribute 'tk'
Exception AttributeError: "TkPickleVar instance has no attribute
'_tk'" in <bound method TkPickleVar.__del__ of <cleo.TkPickl
eVar instance at 0x01B8DE68>> ignored

StephenB

Edward K. Ream

unread,
Jul 30, 2009, 3:39:23 PM7/30/09
to leo-e...@googlegroups.com
On Thu, Jul 30, 2009 at 12:51 PM, Ville M. Vainio <viva...@gmail.com> wrote:

The debian/ubuntu package is also ready:

http://ppa.launchpad.net/villemvainio/ppa/ubuntu/pool/main/l/leo/leo_4.6.1-1_all.deb

Please upload that to sourceforge as well.

Done.

And don't neglect the opportunity to announce at the blog ;-).

:-)

Edward

Ville M. Vainio

unread,
Jul 30, 2009, 4:06:10 PM7/30/09
to leo-e...@googlegroups.com
On Thu, Jul 30, 2009 at 10:37 PM, stephen_b<ste...@theboulets.net> wrote:

> I am unable to open my main .leo file with 4.6.1 (using the qt plugin,
> although the message seems to be Tk related. I can open smaller leo
> files):

The message indicates your file has uAs that contain pickled tk
"variables", whatever that is. I'd try disabling some plugins (esp.
cleo) and seeing if that works. But this is probably harmless since
they are reported as "ignored".

Terry might be able to give more accurate info. Can you get the Tk
version up? If you can, you can use it to strip away the uA, hopefully
emerging with a "clean" document.

stephen_b

unread,
Jul 30, 2009, 6:47:45 PM7/30/09
to leo-editor
On Jul 30, 3:06 pm, "Ville M. Vainio" <vivai...@gmail.com> wrote:
> I'd try disabling some plugins (esp.
> cleo) and seeing if that works.

Hm. cleo was not enabled. I disabled all possible plugins, and I'm
still getting the same thing.

StephenB

Terry Brown

unread,
Jul 31, 2009, 11:11:33 AM7/31/09
to leo-e...@googlegroups.com
On Thu, 30 Jul 2009 12:37:06 -0700 (PDT)
stephen_b <ste...@theboulets.net> wrote:

> I am unable to open my main .leo file with 4.6.1 (using the qt plugin,
> although the message seems to be Tk related. I can open smaller leo
> files):
>
> Exception AttributeError: "TkPickleVar instance has no attribute
> '_tk'" in <bound method TkPickleVar.__del__ of <cleo.TkPickleVar
> instance at 0x0250D558>> ignored

If it's working as intended, this is just a warning message, not an
error that stops your file loading.

uAs are unpickled on load, so if they contain pickles of objects which
are no longer defined, this happens. I think prior to 4.6.x some Tk
stuff was being imported even when you're using Qt, possibly masking
the problem. Pickling any object other than core Python types into uAs
is a bad idea of course, it was something cleo did from way back.

Anyway, as far as I know Edward and / or I changed the uA loading to
ignore failed unpicklings.

Is that the whole Traceback you supplied in the email?

Cheers -Terry

Ville M. Vainio

unread,
Jul 31, 2009, 11:47:28 AM7/31/09
to leo-e...@googlegroups.com
On Thu, Jul 30, 2009 at 10:37 PM, stephen_b<ste...@theboulets.net> wrote:

> That is the short version. When I try passing the file name to
> launchLeo.py, I get that issue plus more:

I'll fix this is in 46-maint branch. Stay tuned.

Ville M. Vainio

unread,
Jul 31, 2009, 11:57:06 AM7/31/09
to leo-e...@googlegroups.com
On Thu, Jul 30, 2009 at 10:37 PM, stephen_b<ste...@theboulets.net> wrote:

> I am unable to open my main .leo file with 4.6.1 (using the qt plugin,
> although the message seems to be Tk related. I can open smaller leo
> files):

Can you please try:

bzr branch lp:~leo-editor-team/leo-editor/46-maint

run launchLeo.py, and try to open the same file.

stephen_b

unread,
Jul 31, 2009, 12:01:31 PM7/31/09
to leo-editor
On Jul 31, 10:11 am, Terry Brown <terry_n_br...@yahoo.com> wrote:
> Is that the whole Traceback you supplied in the email?
>
> Cheers -Terry

Launching with tk:

>C:\Program Files\Leo-4-6-1-final>python launchLeo.py --gui=tk
>Leo 4.6.1 final, July 30, 2009
>Python 2.6.2, Tk 8.5, Pmw 1.3
>Windows 5, 1, 2600, 2, Service Pack 2
>reading settings in C:\Program Files\Leo-4-6-1-final\leo\config\leoSettings.leo
>using menus from: leoSettings.leo
>reading D:\Profiles\csb046\.leo\.leoRecentFiles.txt
>Can not load c:\aspell\bin\aspell-15.dll
>file not found: D:\Profiles\csb046\.leo\workbook.leo
>@enabled-plugins found in leoSettings.leo
>can not load enabled plugin: quicksearch
>can not load enabled plugin: contextmenu
>can not load enabled plugin: nav_qt
>Can not load c:\aspell\bin\aspell-15.dll
>exception executing command
>Traceback (most recent call last):
>
> File "C:\Program Files\Leo-4-6-1-final\leo\core\leoCommands.py", line 387, in doCommand
> val = command(event)
>
> File "C:\Program Files\Leo-4-6-1-final\leo\core\leoCommands.py", line 641, in open
> ok, frame = g.openWithFileName(fileName,c)
>
> File "C:\Program Files\Leo-4-6-1-final\leo\core\leoGlobals.py", line 2787, in openWithFileName
> g.finishOpen(c)
>
> File "C:\Program Files\Leo-4-6-1-final\leo\core\leoGlobals.py", line 2826, in finishOpen
> c.chapterController.finishCreate()
>
> File "C:\Program Files\Leo-4-6-1-final\leo\core\leoChapters.py", line 64, in finishCreate
> cc.chaptersDict[tabName] = chapter(c=c,chapterController=cc,name=tabName,root=p)
>
> File "C:\Program Files\Leo-4-6-1-final\leo\core\leoChapters.py", line 884, in __init__
> cc.tt.createTab(name)
>
> File "C:\Program Files\Leo-4-6-1-final\leo\plugins\tkGui.py", line 9097, in createTab
> tt.setNames()
>
> File "C:\Program Files\Leo-4-6-1-final\leo\plugins\tkGui.py", line 9141, in setNames
> tt.chapterMenu.setitems(names)
>
> File "C:\Program Files\Leo-4-6-1-final\leo\extensions\Pmw\Pmw_1_3\lib\PmwOptionMenu.py", line 67, in setitems
> self._menu.delete(0, 'end')
>
> File "C:\Python26\lib\lib-tk\Tkinter.py", line 2675, in delete
> self.deletecommand(c)
>
> File "C:\Python26\lib\lib-tk\Tkinter.py", line 358, in deletecommand
> self.tk.deletecommand(name)
>
>TclError: can't delete Tcl command

Launching with qt the program hangs after the tk errors:

> Exception AttributeError: "TkPickleVar instance has no attribute '_tk'" in <bound method TkPickleVar.__del__ of <cleo.TkPickleVar instance at 0x024C58C8>> ignored
> Exception AttributeError: "TkPickleVar instance has no attribute '_tk'" in <bound method TkPickleVar.__del__ of <cleo.TkPickleVar instance at 0x024BB418>> ignored

StephenB

Ville M. Vainio

unread,
Jul 31, 2009, 12:18:39 PM7/31/09
to leo-e...@googlegroups.com

Ah, this is still with us, and also on Windows. We probably should
extend the following fix to windows as well:

Other guis-->@thin tkGui.py-->frame classes-->class
leoTkinterTreeTab-->Tabs...-->tt.setNames

# This crashes on recent Ubuntu versions.
# It may be a Tk bug.
if not sys.platform.startswith('linux'):
tt.chapterMenu.setitems(names)

Ville M. Vainio

unread,
Jul 31, 2009, 1:00:50 PM7/31/09
to leo-e...@googlegroups.com
On Fri, Jul 31, 2009 at 7:18 PM, Ville M. Vainio<viva...@gmail.com> wrote:

> Ah, this is still with us, and also on Windows. We probably should
> extend the following fix to windows as well:
>
> Other guis-->@thin tkGui.py-->frame classes-->class
> leoTkinterTreeTab-->Tabs...-->tt.setNames
>
>    # This crashes on recent Ubuntu versions.
>    # It may be a Tk bug.
>    if not sys.platform.startswith('linux'):
>        tt.chapterMenu.setitems(names)

For reference:

https://bugs.launchpad.net/leo-editor/+bug/397433

SegundoBob

unread,
Jul 31, 2009, 12:34:56 PM7/31/09
to leo-editor
Thanks for the debian package.

Under Ubuntu 9.04 (jaunty) I installed the package using the "package
installer." This left my Leo 4.6 intact because Leo 4.6.1 is
installed in a completely different place than Leo 4.6 was installed.
From the package installer "included files" tab I deduced that you
launch it by executing /usr/bin/leo. This failed with the message:

keybindings requires the Pmw module. Official distributions contain
this module in Leo's extensions folder, but this module may be missing
if you get Leo from cvs.

From the "included files" tab in the package installer I see that the
install did not create any "extensions" folder and did not include
Pmw.

So I used Synaptic to install:
python-pmw (version 1.3.2-3) will be installed
Now I can run Leo 4.6.1. There are errors, but Leo seems fairly
functional.

I'm happy with this, but other people might have trouble.

---
SegundoBob

Ville M. Vainio

unread,
Jul 31, 2009, 5:28:22 PM7/31/09
to leo-e...@googlegroups.com
On Fri, Jul 31, 2009 at 7:34 PM, SegundoBob<segun...@gmail.com> wrote:


> From the package installer "included files" tab I deduced that you
> launch it by executing /usr/bin/leo.  This failed with the message:

Either that, or from your application menu under "development". Or,
you can create a launcher of your own. Or, click a .leo file. If one
of these won't work, it's a new bug I missed ;-).

> keybindings requires the Pmw module.  Official distributions contain
> this module in Leo's extensions folder, but this module may be missing
> if you get Leo from cvs.
>
> From the "included files" tab in the package installer I see that the
> install did not create any "extensions" folder and did not include
> Pmw.

I can see that you have 'keybindings.py' plugin enabled. Were you
trying to use qt or tk ui? This is a tk-only plugin that goes ahead
and tries to import pmw & tk, even if you were using qt ui. You should
probably disable that plugin if you are not using it.

'extensions' folder is intentionally not shipped in the debian
package, as doing that would be quite a non-debianic thing to do.

> So I used Synaptic to install:
> python-pmw (version 1.3.2-3) will be installed
> Now I can run Leo 4.6.1.  There are errors, but Leo seems fairly
> functional.

The errors you get are probably harmless, caused by some files being
read only. If you do get actual exceptions, report them as bugs.

> I'm happy with this, but other people might have trouble.

Our consolation is that newcomers probably won't have additional
plugins specified right from the start.

Ville M. Vainio

unread,
Aug 1, 2009, 1:36:41 PM8/1/09
to leo-e...@googlegroups.com
On Fri, Jul 31, 2009 at 7:34 PM, SegundoBob<segun...@gmail.com> wrote:

> From the package installer "included files" tab I deduced that you
> launch it by executing /usr/bin/leo.  This failed with the message:
>
> keybindings requires the Pmw module.  Official distributions contain
> this module in Leo's extensions folder, but this module may be missing
> if you get Leo from cvs.

Fix for this was pushed to 46-maint, so it will be on 4.6.2. This was
indeed pretty bad situation, because a plugin that was implemented
according to guidelines in:

Plugins--> Templates: these show recommended ways of defining
plugins.-->Template for Tk plugin with per-commander controller
class--><< imports >>

prevented the whole Leo from starting up if pmw was not available. The
problematic line was:

Pmw = g.importExtension('Pmw',
pluginName=__name__,verbose=True,required=True)

I removed that "fatal" message (failing to load a plugin should never
be fatal), and fixed up the scenario of missing pmw a bit. Now, if you
have no pmw, you'll get a warning and Qt ui.

SegundoBob

unread,
Aug 1, 2009, 4:14:52 PM8/1/09
to leo-editor
> Were you trying to use qt or tk ui?

I was trying to use the default GUI (i.e., qt).

> Fix for this was pushed to 46-maint, so it will be on 4.6.2. This was
> indeed pretty bad situation, because a plugin that was implemented
> according to guidelines in:

Thanks for the fix. I don't need it and won't take it till 4.6.2, but
it sounds like a good fix.

I think there is a very minor documentation problem in the "What's new
in Leo 4.6" is at:
http://webpages.charter.net/edreamleo/new-4-6.html
and in the Leo 4.6.1 release announcement email:

The –gui=name command-line option specifies the gui to use. The valid
values are –gui=qt, –gui=tk

When you try to pass leo-editor the command line option -gui=qt, you
get error:

leo: error: no such option: -g

And Leo does not run.

The new option is --gui=qt or --gui=tk. That is, two dashes, not one
dash before gui.
---
SegundoBob

Edward K. Ream

unread,
Aug 1, 2009, 4:38:19 PM8/1/09
to leo-e...@googlegroups.com
On Sat, Aug 1, 2009 at 12:36 PM, Ville M. Vainio <viva...@gmail.com> wrote:

I removed that "fatal" message (failing to load a plugin should never
be fatal), and fixed up the scenario of missing pmw a bit. Now, if you
have no pmw, you'll get a warning and Qt ui.

Thanks, once again, for this work.

Edward

Ville M. Vainio

unread,
Aug 2, 2009, 4:37:54 PM8/2/09
to leo-e...@googlegroups.com
On Thu, Jul 30, 2009 at 9:37 PM, stephen_b<ste...@theboulets.net> wrote:

> I am unable to open my main .leo file with 4.6.1 (using the qt plugin,
> although the message seems to be Tk related. I can open smaller leo
> files):

Any change you could try opening the same file on current trunk
version (bzr branch lp:leo-editor)? I think this should be fixed now
(on both 46-maint and trunk), but I'd like to have some confirmation
before we release 4.6.2...

Reply all
Reply to author
Forward
0 new messages