leo stopped to understand the outline it was working with before

32 views
Skip to first unread message

gar

unread,
Feb 25, 2020, 2:34:57 AM2/25/20
to leo-editor
I do rarely sync with devel, once per 2-3 weeks.
Today I decided to sync up my working copy with the latest changes of 'develop' branch.

After that leo could not start because of:

--global-docks: False
duplicate, (not conflicting) key bindings in myLeoSettings.leo
tree   Tab focus-to-body
all    Tab indent-region
text   Tab newline-and-indent
Leo 6.2-b1-devel, **** branch, build 1b230938df
2020-02-25 10:01:10 +0300
wrote recent file: C:/Users/****/.leo/.leoRecentFiles.txt

bad .leo file: WORK.leo
g.toUnicode: unexpected argument of type ParseError
toUnicode openLeoFile,getLeoFile,readFile,readWithElementTree


Traceback (most recent call last):

  File "E:\git\leo\leo\core\leoCommands.py", line 2278, in executeAnyCommand
    return command(event)

  File "E:\git\leo\leo\core\leoGlobals.py", line 240, in commander_command_wrapper
    method(event=event)

  File "E:\git\leo\leo\commands\commanderFileCommands.py", line 261, in open_outline
    open_completer(c, closeFlag, fileName)

  File "E:\git\leo\leo\commands\commanderFileCommands.py", line 204, in open_completer
    c2 = g.openWithFileName(fileName, old_c=c)

  File "E:\git\leo\leo\core\leoGlobals.py", line 3920, in openWithFileName
    return g.app.loadManager.loadLocalFile(fileName, gui, old_c)

  File "E:\git\leo\leo\core\leoApp.py", line 3288, in loadLocalFile
    previousSettings = lm.getPreviousSettings(fn)

  File "E:\git\leo\leo\core\leoApp.py", line 2241, in getPreviousSettings
    c = lm.openSettingsFile(fn)

  File "E:\git\leo\leo\core\leoApp.py", line 2412, in openSettingsFile
    ok = c.fileCommands.openLeoFile(theFile, fn,

  File "E:\git\leo\leo\core\leoFileCommands.py", line 692, in openLeoFile
    ok, ratio = self.getLeoFile(

  File "E:\git\leo\leo\core\leoFileCommands.py", line 559, in getLeoFile
    v = FastRead(c, self.gnxDict).readFile(fileName)

  File "E:\git\leo\leo\core\leoFileCommands.py", line 60, in readFile
    v, g_element = self.readWithElementTree(path, s)

TypeError: cannot unpack non-iterable NoneType object

Traceback (most recent call last):
  File "E:\git\leo\leo\plugins\qt_frame.py", line 1638, in closeEvent
    g.app.gui.close_event(event)
AttributeError: 'NullGui' object has no attribute 'close_event'

Well then I rolled back to the version I was working with before. The same issue.
What went that wrong and how can I restore access to my outline now?

gar

unread,
Feb 25, 2020, 2:49:10 AM2/25/20
to leo-editor
This is horrible disaster. I cannot load to leo any version of my WORK outline, even version far from the past.
After every unsuccessful attempt leo becomes non-functional: it ignores any command to load any other outline and I need to restart it to try once again.
Other outlines are open w/o problems.

gar

unread,
Feb 25, 2020, 3:23:58 AM2/25/20
to leo-editor
I debugged a little and found there was a symbol with code 0x1 in the outline. I removed it and now file can be loaded.

But I think that this lighted some great problems with leo:

1. I didnt use any other editor or something for editing the outline. This means that bad symbol was entered via the leo's editor.
2. Leo saved it w/o abuse. How could I know that I did somethign wrong?
3. The error message a) printed to console and b) told nothing about the real problem. How can user know that something went wrong? All he can see is just that leo becomes non-functional.
4. And yes. Leo becomes. It cannot deal with outlines anymore. It cannot save it's state
5. If this happens during startup when session is restored - leo just silently stops.

I believe that all this things are very weird and they could be avoided with a very simple thing: QDialog with complete error description. Which is missing by some reason.

Thank you for your attention. Hope my words would help.

Edward K. Ream

unread,
Feb 25, 2020, 5:22:28 AM2/25/20
to leo-editor
On Tue, Feb 25, 2020 at 2:24 AM gar <gar...@gmail.com> wrote:
I debugged a little and found there was a symbol with code 0x1 in the outline. I removed it and now file can be loaded.

But I think that this lighted some great problems with leo:

Thanks for your sleuthing. I have just created #1510 for this.

Edward
Reply all
Reply to author
Forward
0 new messages