On Tue, Aug 15, 2017 at 10:09 AM, vitalije <[email protected]> wrote:

> Done at b603634.
>
> Leo now avoids to throw exceptions in unexpected conditions while reading
> database. I have also switched protocol for pickle.dumps to enable sharing
> same .leo.db file while using both python2 and python3. (Before files
> written with python3 could not be opened with python2 because it was used
> highest protocol for pickle).
>
> Opening empty .leo.db (or non existent) follows the same principle as when
> opening empty .leo file. It creates one top level node.
>

​We're getting closer, but Leo is not reading leoPy.db at all now.

Deleted leoPy.db and created it anew.  I got this with Python 3:

Traceback (most recent call last):

  File "c:\leo.repo\leo-editor\leo\core\leoGlobals.py", line 2317, in
wrapper
    func(self, event=event)

  File "c:\leo.repo\leo-editor\leo\core\leoCommands.py", line 2553, in
saveTo
    c.fileCommands.saveTo(fileName)

  File "c:\leo.repo\leo-editor\leo\core\leoFileCommands.py", line 1557, in
saveTo
    self.write_Leo_file(fileName, outlineOnlyFlag=False)

  File "c:\leo.repo\leo-editor\leo\core\leoFileCommands.py", line 1947, in
write_Leo_file
    return fc.exportToSqlite(fileName)

  File "c:\leo.repo\leo-editor\leo\core\leoFileCommands.py", line 2146, in
exportToSqlite
    fc.exportHashesToSqlite(conn)

  File "c:\leo.repo\leo-editor\leo\core\leoFileCommands.py", line 2235, in
exportHashesToSqlite
    map(lambda x:(x[1], md5(x[0])), files))

  File "c:\leo.repo\leo-editor\leo\core\leoFileCommands.py", line 2235, in
<lambda>
    map(lambda x:(x[1], md5(x[0])), files))

  File "c:\leo.repo\leo-editor\leo\core\leoFileCommands.py", line 2218, in
md5
    s = s.replace('\r\n', '\n')

TypeError: a bytes-like object is required, not 'str'

Edward​

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to