AttributeError when attempting to startup qt-plugin

2008-10-22 Thread jkn

Hi there
after following all the recent qt-pluging work with excitement, I
thought I'd take a look. This is from qt-plugin branch rev. 1360.

It's probably a newbie error, but here's what I'm seeing after running

$ python launchLeo.py --gui=qt

reading settings in /transfer/qt-plugin/leo/config/leoSettings.leo
Using menus from leoSettings.leo
reading /home/jkn/.leo/.leoRecentFiles.txt
loaded plugin: qtGui
@enabled-plugins found in leoSettings.leo
can not load enabled plugin: mod_scripting
rst3 plugin: SilverCity not loaded
rst3 plugin not loaded: can not load docutils
can not load enabled plugin: rst3
can not load enabled plugin: UNL
can not load enabled plugin: nav_buttons
can not load enabled plugin: hoist
image.py: can not import ImageTk
can not load enabled plugin: image
can not load enabled plugin: threading_colorizer
You must be using Python 2.5 or above to use aspell on Linux
Traceback (most recent call last):
  File launchLeo.py, line 8, in ?
leo.core.runLeo.run()
  File /transfer/qt-plugin/leo/core/runLeo.py, line 120, in run
c,frame = createFrame(fileName,relativeFileName,script)
  File /transfer/qt-plugin/leo/core/runLeo.py, line 170, in
createFrame
c.chapterController.finishCreate()
  File /transfer/qt-plugin/leo/core/leoChapters.py, line 50, in
finishCreate
cc.createChaptersNode()
  File /transfer/qt-plugin/leo/core/leoChapters.py, line 473, in
createChaptersNode
p = root.insertAsLastChild()
  File /transfer/qt-plugin/leo/core/leoNodes.py, line 2307, in
insertAsLastChild
n = p.numberOfChildren()
  File /transfer/qt-plugin/leo/core/leoNodes.py, line 1263, in
numberOfChildren
return len(p.v.t.children)
AttributeError: 'NoneType' object has no attribute 't'


Thanks fro all the great work on Leo. I might mention that it's great
to 'look over your shoulders' as things progress.

Cheers
J^n

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
leo-editor group.
To post to this group, send email to leo-editor@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: AttributeError when attempting to startup qt-plugin

2008-10-22 Thread Edward K. Ream



On Oct 22, 2:01 pm, jkn [EMAIL PROTECTED] wrote:

     p = root.insertAsLastChild()
   File /transfer/qt-plugin/leo/core/leoNodes.py, line 2307, in
 insertAsLastChild
     n = p.numberOfChildren()
   File /transfer/qt-plugin/leo/core/leoNodes.py, line 1263, in
 numberOfChildren
     return len(p.v.t.children)
 AttributeError: 'NoneType' object has no attribute 't'

The fix is at rev 1362 of the qt-plugin branch.

Apparently, this bug happens only if

a) you don't specify a file name *and* there is no default
workbook .leo file or
b) you specify a non-existent .leo file.

The fix was to call createFirstTreeNode in leoQtFrame.finishCreate.
Rather than copying and pasting the (gui-independent) code from
leoTkinterFrame.py, I moved the method to the base leoFrame class; and
added createFirstTreeNode to the list of methods that must be defined
in the base class.  The unit test that tests such relationships is
happy.

Conceivably this fixes another bug, so let me know if there are other
problems.

Edward
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
leo-editor group.
To post to this group, send email to leo-editor@googlegroups.com
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
-~--~~~~--~~--~--~---