Strange Behaviour - File Won't Open

50 views
Skip to first unread message

Israel Hands

unread,
Jun 15, 2021, 5:52:08 PM6/15/21
to leo-editor
I have  a file I use to jot down passwords and useful info and every now and then I save a copy with a new date. As you can understand It is a file I'm very attached to and it is always open. 

This bit may or may not be relevant!
Today I fancied changing the basic font size - my eyes are getting old fast so I went to Edit Settings in the Settings menu and changed the 
@string font-size = 14pt  to @string font-size = 16pt 

At some point later I wanted to check an entry in my master password file and noticed it wasn't open - strange. I selected it from recent files 

But lo nothing happens

I get an entry in the log file

Reading settings in D:/Sync_Disk/xxxxxxxxx.leo with the right path and file name but no file opens. 

If I use Open-Outline from the File menu - it also fails. But no error messages of any kind.

Should shoot myself now or just start drinking heavily?

ta

IH



Israel Hands

unread,
Jun 15, 2021, 5:54:16 PM6/15/21
to leo-editor
Sorry system details

Leo 6.3, master branch, build e46e9315f6
2020-11-10 00:33:16 -0600
Python 3.7.3, PyQt version 5.12.3
Windows 10 AMD64 (build 10.0.19041) SP0

Israel Hands

unread,
Jun 15, 2021, 6:26:10 PM6/15/21
to leo-editor
I spoke too soon - now I have an error message - 

 bad .leo file: G-Sync-Tech-Contacts-20-04-21.leo

I can open it in Notepad++ - the header looks like this - 

<?xml version="1.0" encoding="utf-8"?>
<!-- Created by Leo: http://leoeditor.com/leo_toc.html -->
<leo_header file_format="2"/>
<globals/>
<preferences/>
<find_panel_settings/>
<vnodes>

tbp1...@gmail.com

unread,
Jun 15, 2021, 7:41:54 PM6/15/21
to leo-editor
I'd run an XML parser on it to see if some kind of corruption has rendered the file not well-formed XML. I like to use rxp :


IIRC, you need to give it a file: url:  file:///c:/path/to/file.

You run it on the file and it will echo it to the screen unless there is an XML error of some kind.  It may be best to redirect the output  to nul.  Here is a typical session using an XML file where I introduced an error:

C:\Users\tom>rxp file:///c:\temp\bad.xml >nul
Warning: illegal backslashes in URL path "/c:\temp\bad.xml"replaced by slashes
Warning: illegal backslashes in URL path "/c:\temp\bad.xml"replaced by slashes
Error: Mismatched end tag: expected </sdsc>, got </entry>
 in unnamed entity at line 14 char 10 of file:///c:\temp\bad.xml

If there is an XML error, you will probably be able to fix it by hand, and hopefully not lose much if any data.  You do have a backup, right?  :-)

Israel Hands

unread,
Jun 16, 2021, 7:12:05 AM6/16/21
to leo-editor
Removing hat!

Many, many thanks. I ran rxp - it found an illegal character. I deleted it. All seems well. How thin the line is between triumph and disaster!

Thanks for such timely and accurate help.

IH

tbp1...@gmail.com

unread,
Jun 16, 2021, 9:01:39 AM6/16/21
to leo-editor
Glad you could fix it up!

tbp1...@gmail.com

unread,
Jun 16, 2021, 6:33:21 PM6/16/21
to leo-editor
Hey, @Israel, take a look at the new thread I just posted on Freewin.  Freewin grew out of that thread on Zettelkasten that you started over a year ago.  Remember that?

Israel Hands

unread,
Jun 19, 2021, 8:00:29 AM6/19/21
to leo-editor
Thanks - just seen the headline - I'm going to dive in now!  Ta  IH
Reply all
Reply to author
Forward
0 new messages