Leo 5.x no longer working in my Windows 10 environment

138 views
Skip to first unread message

Viktor Ransmayr

unread,
Jun 27, 2016, 2:40:35 PM6/27/16
to leo-editor
Leo 5.3 was working fine for me for quite some time.

Without any (known) changes Leo stopped working :-(

Here are the relevant tracebacks

<TB-01>

Windows PowerShell
Copyright (C) 2015 Microsoft Corporation. Alle Rechte vorbehalten.

PS C:\Users\Viktor> cd worklogs
PS C:\Users\Viktor\worklogs> leo wl2016.leo
leoID=VIRA2015 (in C:\Users\Viktor\.leo)
reading settings in C:\Users\Viktor\Programs\leo53\leo\config\leoSettings.leo
reading settings in C:\Users\Viktor\.leo\myLeoSettings.leo
reading settings in C:\Users\Viktor\worklogs\wl2016.leo

** isPython3: True
Leo 5.3-final, build 20160412153848, Tue Apr 12 15:38:48 CDT 2016
Not running from a git repo
Python 3.5.1, PyQt version 5.6.0
Windows 10 AMD64 (build 10.0.10586) SP0
Traceback (most recent call last):
  File "C:\Users\Viktor\Programs\leo53\launchLeo.py", line 8, in <module>
    leo.core.runLeo.run()
  File "C:\Users\Viktor\Programs\leo53\leo\core\runLeo.py", line 63, in run
    g.app.loadManager.load(fileName, pymacs)
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoApp.py", line 2076, in load
    ok = lm.doPostPluginsInit()
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoApp.py", line 2418, in doPostPluginsInit
    c = lm.loadLocalFile(fn, gui=g.app.gui, old_c=None)
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoApp.py", line 2656, in loadLocalFile
    c = lm.openFileByName(fn, gui, old_c, previousSettings)
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoApp.py", line 2705, in openFileByName
    lm.createMenu(c, fn)
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoApp.py", line 2714, in createMenu
    g.app.recentFilesManager.updateRecentFiles(fn)
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoApp.py", line 3138, in updateRecentFiles
    if (munge(fileName) == munge(name) or
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoApp.py", line 3128, in munge
    return g.os_path_finalize(name or '').lower()
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoGlobals.py", line 5910, in os_path_finalize
    path = os.path.abspath(path)
  File "C:\Python35\lib\ntpath.py", line 535, in abspath
    path = _getfullpathname(path)
ValueError: _getfullpathname: embedded null character
PS C:\Users\Viktor\worklogs>

</TB-01>

Then I tried to call Leo 5.3 w/o an explicit outline. - Same result:

<TB-02>

PS C:\Users\Viktor\worklogs> leo
leoID=VIRA2015 (in C:\Users\Viktor\.leo)
reading settings in C:\Users\Viktor\Programs\leo53\leo\config\leoSettings.leo
reading settings in C:\Users\Viktor\.leo\myLeoSettings.leo
Using default leo file name:
C:\Users\Viktor\.leo\workbook.leo

** isPython3: True
Leo 5.3-final, build 20160412153848, Tue Apr 12 15:38:48 CDT 2016
Not running from a git repo
Python 3.5.1, PyQt version 5.6.0
Windows 10 AMD64 (build 10.0.10586) SP0
Traceback (most recent call last):
  File "C:\Users\Viktor\Programs\leo53\launchLeo.py", line 8, in <module>
    leo.core.runLeo.run()
  File "C:\Users\Viktor\Programs\leo53\leo\core\runLeo.py", line 63, in run
    g.app.loadManager.load(fileName, pymacs)
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoApp.py", line 2076, in load
    ok = lm.doPostPluginsInit()
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoApp.py", line 2429, in doPostPluginsInit
    c1 = lm.openEmptyWorkBook()
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoApp.py", line 2491, in openEmptyWorkBook
    c = lm.loadLocalFile(fn, gui=g.app.gui, old_c=None)
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoApp.py", line 2656, in loadLocalFile
    c = lm.openFileByName(fn, gui, old_c, previousSettings)
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoApp.py", line 2705, in openFileByName
    lm.createMenu(c, fn)
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoApp.py", line 2714, in createMenu
    g.app.recentFilesManager.updateRecentFiles(fn)
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoApp.py", line 3138, in updateRecentFiles
    if (munge(fileName) == munge(name) or
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoApp.py", line 3128, in munge
    return g.os_path_finalize(name or '').lower()
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoGlobals.py", line 5910, in os_path_finalize
    path = os.path.abspath(path)
  File "C:\Python35\lib\ntpath.py", line 535, in abspath
    path = _getfullpathname(path)
ValueError: _getfullpathname: embedded null character
PS C:\Users\Viktor\worklogs>

</TB-02>

I even tried to change Leo back to version 5.1. - Unfortunately a similar result:

<TB-03>

PS C:\Users\Viktor\worklogs> leo
leoID=VIRA2015 (in C:\Users\Viktor\.leo)
reading settings in C:\Users\Viktor\Programs\leo53\leo\config\leoSettings.leo
reading settings in C:\Users\Viktor\.leo\myLeoSettings.leo
Using default leo file name:
C:\Users\Viktor\.leo\workbook.leo

** isPython3: True
Leo 5.3-final, build 20160412153848, Tue Apr 12 15:38:48 CDT 2016
Not running from a git repo
Python 3.5.1, PyQt version 5.6.0
Windows 10 AMD64 (build 10.0.10586) SP0
Traceback (most recent call last):
  File "C:\Users\Viktor\Programs\leo53\launchLeo.py", line 8, in <module>
    leo.core.runLeo.run()
  File "C:\Users\Viktor\Programs\leo53\leo\core\runLeo.py", line 63, in run
    g.app.loadManager.load(fileName, pymacs)
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoApp.py", line 2076, in load
    ok = lm.doPostPluginsInit()
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoApp.py", line 2429, in doPostPluginsInit
    c1 = lm.openEmptyWorkBook()
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoApp.py", line 2491, in openEmptyWorkBook
    c = lm.loadLocalFile(fn, gui=g.app.gui, old_c=None)
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoApp.py", line 2656, in loadLocalFile
    c = lm.openFileByName(fn, gui, old_c, previousSettings)
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoApp.py", line 2705, in openFileByName
    lm.createMenu(c, fn)
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoApp.py", line 2714, in createMenu
    g.app.recentFilesManager.updateRecentFiles(fn)
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoApp.py", line 3138, in updateRecentFiles
    if (munge(fileName) == munge(name) or
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoApp.py", line 3128, in munge
    return g.os_path_finalize(name or '').lower()
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoGlobals.py", line 5910, in os_path_finalize
    path = os.path.abspath(path)
  File "C:\Python35\lib\ntpath.py", line 535, in abspath
    path = _getfullpathname(path)
ValueError: _getfullpathname: embedded null character
PS C:\Users\Viktor\worklogs>

</TB-03>

Any ideas?

With kind regards,

Viktor

Edward K. Ream

unread,
Jun 27, 2016, 10:46:17 PM6/27/16
to leo-editor
On Mon, Jun 27, 2016 at 1:40 PM, Viktor Ransmayr <viktor....@gmail.com> wrote:
Leo 5.3 was working fine for me for quite some time.

Without any (known) changes Leo stopped working :-(

Here are the relevant tracebacks

<TB-01>
​[snip]​
 
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoGlobals.py", line 5910, in
​​
os_path_finalize
    path = os.path.abspath(path)
  File "C:\Python35\lib\ntpath.py", line 535, in abspath
    path = _getfullpathname(path)
ValueError: _getfullpathname: embedded null character
PS C:\Users\Viktor\worklogs>

It seems there is a null character in one of your file names.

True, Leo should probably handle such things.  It might be a change to _getfullpathname (that is, a change to Python 3.5) or it might be that somehow a null character has found its way into one of your file names.

> ​Any ideas?

Find out what path is actually passed to ​g.os_path_finalize.  You could insert a call to g.trace(repr(path)) and see.

Edward​

Viktor Ransmayr

unread,
Jun 28, 2016, 1:59:55 AM6/28/16
to leo-e...@googlegroups.com
Hello Edward,

Thanks for your quick feedback!

Here are the new tracebacks, when I call it with an explicit outline argument

<TB-4>


Windows PowerShell
Copyright (C) 2015 Microsoft Corporation. Alle Rechte vorbehalten.

PS C:\Users\Viktor> cd worklogs
PS C:\Users\Viktor\worklogs> leo wl2016.leo
os_path_finalize 'C:\\Users\\Viktor\\Programs\\leo53\\leo\\core\\leoGlobals.py'
os_path_finalize 'C:\\Users\\Viktor\\Programs\\leo53\\leo\\core'
os_path_finalize 'C:\\Users\\Viktor'
os_path_finalize 'C:\\Users\\Viktor\\Programs\\leo53\\leo\\config'
os_path_finalize 'wl2016.leo'

leoID=VIRA2015 (in C:\Users\Viktor\.leo)
reading settings in C:\Users\Viktor\Programs\leo53\leo\config\leoSettings.leo
reading settings in C:\Users\Viktor\.leo\myLeoSettings.leo
os_path_finalize 'C:\\Users\\Viktor\\Programs\\leo53\\leo\\config\\leoSettings.leo'
os_path_finalize 'C:\\Users\\Viktor\\Programs\\leo53\\leo\\config\\leoSettings.leo'
os_path_finalize 'C:\\Users\\Viktor\\Programs\\leo53\\leo\\config\\leoSettings.leo'
os_path_finalize 'C:\\Users\\Viktor\\Programs\\leo53\\leo\\config\\leoSettings.leo'
os_path_finalize 'C:\\Users\\Viktor\\.leo'
os_path_finalize 'C:\\Users\\Viktor\\Programs\\leo53\\leo\\config'
os_path_finalize 'C:\\Users\\Viktor\\worklogs'
os_path_finalize 'C:\\Users\\Viktor\\worklogs\\wl2016.leo'

reading settings in C:\Users\Viktor\worklogs\wl2016.leo

** isPython3: True
Leo 5.3-final, build 20160412153848, Tue Apr 12 15:38:48 CDT 2016
Not running from a git repo
Python 3.5.1, PyQt version 5.6.0
Windows 10 AMD64 (build 10.0.10586) SP0
os_path_finalize 'C:\\Users\\Viktor\\worklogs\\wl2016.leo'
os_path_finalize '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x
00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x
00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x
00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x
00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x
00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x
00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x
00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x
00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x
00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x
00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x
00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x
00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x
00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x
00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'

Traceback (most recent call last):
  File "C:\Users\Viktor\Programs\leo53\launchLeo.py", line 8, in <module>
    leo.core.runLeo.run()
  File "C:\Users\Viktor\Programs\leo53\leo\core\runLeo.py", line 63, in run
    g.app.loadManager.load(fileName, pymacs)
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoApp.py", line 2076, in load
    ok = lm.doPostPluginsInit()
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoApp.py", line 2418, in doPostPluginsInit
    c = lm.loadLocalFile(fn, gui=g.app.gui, old_c=None)
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoApp.py", line 2656, in loadLocalFile
    c = lm.openFileByName(fn, gui, old_c, previousSettings)
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoApp.py", line 2705, in openFileByName
    lm.createMenu(c, fn)
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoApp.py", line 2714, in createMenu
    g.app.recentFilesManager.updateRecentFiles(fn)
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoApp.py", line 3138, in updateRecentFiles
    if (munge(fileName) == munge(name) or
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoApp.py", line 3128, in munge
    return g.os_path_finalize(name or '').lower()
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoGlobals.py", line 5912, in os_path_finalize

    path = os.path.abspath(path)
  File "C:\Python35\lib\ntpath.py", line 535, in abspath
    path = _getfullpathname(path)
ValueError: _getfullpathname: embedded null character
PS C:\Users\Viktor\worklogs>

</TB-4>

and when I call Leo without an explicit outline as an argument ...

<TB-5>

PS C:\Users\Viktor\worklogs> leo
os_path_finalize 'C:\\Users\\Viktor\\Programs\\leo53\\leo\\core\\leoGlobals.py'
os_path_finalize 'C:\\Users\\Viktor\\Programs\\leo53\\leo\\core'
os_path_finalize 'C:\\Users\\Viktor'
os_path_finalize 'C:\\Users\\Viktor\\Programs\\leo53\\leo\\config'

leoID=VIRA2015 (in C:\Users\Viktor\.leo)
reading settings in C:\Users\Viktor\Programs\leo53\leo\config\leoSettings.leo
reading settings in C:\Users\Viktor\.leo\myLeoSettings.leo
os_path_finalize 'C:\\Users\\Viktor\\Programs\\leo53\\leo\\config\\leoSettings.leo'
os_path_finalize 'C:\\Users\\Viktor\\Programs\\leo53\\leo\\config\\leoSettings.leo'
os_path_finalize 'C:\\Users\\Viktor\\Programs\\leo53\\leo\\config\\leoSettings.leo'
os_path_finalize 'C:\\Users\\Viktor\\Programs\\leo53\\leo\\config\\leoSettings.leo'
os_path_finalize 'C:\\Users\\Viktor\\.leo'
os_path_finalize 'C:\\Users\\Viktor\\Programs\\leo53\\leo\\config'
os_path_finalize 'C:\\Users\\Viktor\\.leo\\workbook.leo'

Using default leo file name:
C:\Users\Viktor\.leo\workbook.leo
os_path_finalize 'C:\\Users\\Viktor\\.leo\\workbook.leo'


** isPython3: True
Leo 5.3-final, build 20160412153848, Tue Apr 12 15:38:48 CDT 2016
Not running from a git repo
Python 3.5.1, PyQt version 5.6.0
Windows 10 AMD64 (build 10.0.10586) SP0
os_path_finalize 'C:\\Users\\Viktor\\.leo\\workbook.leo'
os_path_finalize '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x
00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x
00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x
00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x
00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x
00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x
00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x
00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x
00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x
00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x
00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x
00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x
00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x
00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x
00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'

Traceback (most recent call last):
  File "C:\Users\Viktor\Programs\leo53\launchLeo.py", line 8, in <module>
    leo.core.runLeo.run()
  File "C:\Users\Viktor\Programs\leo53\leo\core\runLeo.py", line 63, in run
    g.app.loadManager.load(fileName, pymacs)
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoApp.py", line 2076, in load
    ok = lm.doPostPluginsInit()
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoApp.py", line 2429, in doPostPluginsInit
    c1 = lm.openEmptyWorkBook()
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoApp.py", line 2491, in openEmptyWorkBook
    c = lm.loadLocalFile(fn, gui=g.app.gui, old_c=None)
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoApp.py", line 2656, in loadLocalFile
    c = lm.openFileByName(fn, gui, old_c, previousSettings)
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoApp.py", line 2705, in openFileByName
    lm.createMenu(c, fn)
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoApp.py", line 2714, in createMenu
    g.app.recentFilesManager.updateRecentFiles(fn)
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoApp.py", line 3138, in updateRecentFiles
    if (munge(fileName) == munge(name) or
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoApp.py", line 3128, in munge
    return g.os_path_finalize(name or '').lower()
  File "C:\Users\Viktor\Programs\leo53\leo\core\leoGlobals.py", line 5912, in os_path_finalize

    path = os.path.abspath(path)
  File "C:\Python35\lib\ntpath.py", line 535, in abspath
    path = _getfullpathname(path)
ValueError: _getfullpathname: embedded null character
PS C:\Users\Viktor\worklogs>

</TB-5>

!!! What irritates me is that something changed *without* any (known) update to Leo *or* Python  !!!

With kind regards,

Viktor



--
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 leo-editor+...@googlegroups.com.
To post to this group, send email to leo-e...@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Edward K. Ream

unread,
Jun 28, 2016, 11:56:45 AM6/28/16
to leo-editor
On Tue, Jun 28, 2016 at 12:59 AM, Viktor Ransmayr <viktor....@gmail.com> wrote:
Hello Edward,

Thanks for your quick feedback!

​You're welcome.​
 

Here are the new tracebacks, when I call it with an explicit outline argument

​[lots of null characters]

!!! What irritates me is that something changed *without* any (known) update to Leo *or* Python  !!!

​It's a mystery.  Purely as a guess, I would say somehow the filename changed.

EKR

Viktor Ransmayr

unread,
Jun 28, 2016, 2:21:16 PM6/28/16
to leo-e...@googlegroups.com
Hello Edward,

I would accept that *somehow* one file(-name) changed - but - I'm sure you saw that I also started Leo w/o an explicit outline argument ...

Please let me know if there is anything else you want me to deliver. - Otherwise I plan to completely erase this environment ...

With kind regards,

Viktor



--

Edward K. Ream

unread,
Jun 28, 2016, 5:53:26 PM6/28/16
to leo-editor
On Tue, Jun 28, 2016 at 1:21 PM, Viktor Ransmayr <viktor....@gmail.com> wrote:
Hello Edward,

I would accept that *somehow* one file(-name) changed - but - I'm sure you saw that I also started Leo w/o an explicit outline argument ...

Please let me know if there is anything else you want me to deliver. - Otherwise I plan to completely erase this environment ...

​Please don't do that just yet.  It's always good to retain failures until we are sure that we know what the causes were.​
 

On Windows 10 I'm presently using Python 3.5.1, with PyQt 4.8.7.  I'll see if I can upgrade to PyQt version 5.6.0.

Edward

Edward K. Ream

unread,
Jun 28, 2016, 6:40:07 PM6/28/16
to leo-editor
On Tue, Jun 28, 2016 at 4:53 PM, Edward K. Ream <edre...@gmail.com> wrote:


On Tue, Jun 28, 2016 at 1:21 PM, Viktor Ransmayr <viktor....@gmail.com> wrote:
Hello Edward,

I would accept that *somehow* one file(-name) changed - but - I'm sure you saw that I also started Leo w/o an explicit outline argument ...

​I'm having trouble installing PyQt5 on my Anaconda 2/3 installations on Windows 10.  That is, even after a conda update pyqt I still have PyQt 4.8.7. How did you upgrade to PyQt5?​
 

​Edward

Viktor Ransmayr

unread,
Jun 29, 2016, 1:18:17 AM6/29/16
to leo-e...@googlegroups.com
I used the "PyQt5-5.6-gpl-Py3.5-Qt5.6.0-x64.exe" from

https://www.riverbankcomputing.com/software/pyqt/download5


--

Edward K. Ream

unread,
Jun 29, 2016, 8:24:29 AM6/29/16
to leo-editor
On Tue, Jun 28, 2016 at 1:21 PM, Viktor Ransmayr <viktor....@gmail.com> wrote:
Hello Edward,

I would accept that *somehow* one file(-name) changed - but - I'm sure you saw that I also started Leo w/o an explicit outline argument ...

Please let me know if there is anything else you want me to deliver. - Otherwise I plan to completely erase this environment ...

​I meant to suggest keeping the environment only if doing so is convenience for you.  Otherwise, do erase it and chalk it up to one of life's mysteries.

EKR

Viktor Ransmayr

unread,
Jun 29, 2016, 2:30:45 PM6/29/16
to leo-e...@googlegroups.com

Thanks for making this explicit.

I can & will wait until the weekend - but - no longer.

Anything that might help you diagnose the 'mystery' will be delivered until Friday EOB (CET ;-)

Then I will proceed to restore this device environment ...

With kind regards,

Viktor

Edward K. Ream

unread,
Jul 1, 2016, 9:39:22 AM7/1/16
to leo-editor, viktor....@googlemail.com
On Wednesday, June 29, 2016 at 1:30:45 PM UTC-5, Viktor Ransmayr wrote:

I can & will wait until the weekend - but - no longer.

You may as well delete the environment now.  I am not going to get to this today.

EKR

Edward K. Ream

unread,
Dec 2, 2016, 9:39:16 PM12/2/16
to leo-editor
On Monday, June 27, 2016 at 1:40:35 PM UTC-5, Viktor Ransmayr wrote:

Leo 5.3 was working fine for me for quite some time.

Without any (known) changes Leo stopped working :-(

Happily, I think we can say, the same thing just happened to me when I installed Python 3.5.2 on Anaconda 4.2.0 on my Win 10 laptop.  This was a pretty clean install: I uninstalled lots of old pythons first.
 
Rev 2e1137 works around this problem in an inelegant, but probably completely safe way.

Here are the relevant tracebacks

[Snip]

  File "C:\Users\Viktor\Programs\leo53\leo\core\leoGlobals.py", line 5910, in os_path_finalize
    path = os.path.abspath(path)
  File "C:\Python35\lib\ntpath.py", line 535, in abspath
    path = _getfullpathname(path)
ValueError: _getfullpathname: embedded null character

Googling the exact error message (ValueError: _getfullpathname: embedded null character) yielded this page.

QQQ

This is a bug in python, not matplotlib. The issue is that winreg.EnumValue is not cutting string values at their length properly for some reason, and strings will include null characters which os.path.abspath is not able to process.

QQQ


It appears this bug has been around for a long time.  Otoh, it only bites on one of my Windows 10 machines. Pretty mysterious.

The fix is to strip null characters from paths in various places:

    path = path.replace('\x00','') # Fix Python 3 bug on Windows 10.

In an emergency, this kind of code can be applied right at the point of the crash, in this case, C:\Python35\lib\ntpath.py.

I am glad to be able to acknowledge this problem properly. It takes quite a bit of maintenance just to keep pace with new python bugs.

Edward

Edward K. Ream

unread,
Dec 3, 2016, 6:01:17 AM12/3/16
to leo-editor
On Fri, Dec 2, 2016 at 8:39 PM, Edward K. Ream <edre...@gmail.com> wrote:
On Monday, June 27, 2016 at 1:40:35 PM UTC-5, Viktor Ransmayr wrote:

Leo 5.3 was working fine for me for quite some time.

Without any (known) changes Leo stopped working :-(

Happily, I think we can say, the same thing just happened to me when I installed Python 3.5.2 on Anaconda 4.2.0 on my Win 10 laptop.  This was a pretty clean install: I uninstalled lots of old pythons first.
 
Rev 2e1137 works around this problem in an inelegant, but probably completely safe way.

Here are the relevant tracebacks

[Snip]

  File "C:\Users\Viktor\Programs\leo53\leo\core\leoGlobals.py", line 5910, in os_path_finalize
    path = os.path.abspath(path)
  File "C:\Python35\lib\ntpath.py", line 535, in abspath
    path = _getfullpathname(path)
ValueError: _getfullpathname: embedded null character

Googling the exact error message (ValueError: _getfullpathname: embedded null character) yielded this page.

QQQ

This is a bug in python, not matplotlib. The issue is that winreg.EnumValue is not cutting string values at their length properly for some reason, and strings will include null characters which os.path.abspath is not able to process.

QQQ


​The last post for this issue was in January.  That's not good enough, as I say here.

EKR

Edward K. Ream

unread,
Dec 29, 2016, 4:53:18 AM12/29/16
to leo-editor
On Saturday, December 3, 2016 at 6:01:17 AM UTC-5, Edward K. Ream wrote:
 
> Rev 2e1137 works around this problem in an inelegant, but probably completely safe way.

​The last post for this issue was in January.  That's not good enough, as I say here.

This issue has just been fixed for Python 3.6.1 and all future 3.x releases.   Leo #355 memorializes this issue for future reference.

EKR

Viktor Ransmayr

unread,
Dec 29, 2016, 8:54:45 AM12/29/16
to leo-e...@googlegroups.com
Hello Edward,

I just doublechecked & can confirm your statement related to rev 2e1137:

* Python 3.6.0 + PyQt 5.7.1 + Leo 5.4 still produce the original exception.

* Python 3.6.0 + PyQt 5.7.1 + leo-editor-master (today) work fine now in my environment ...

With kind regards,

VR

Reply all
Reply to author
Forward
0 new messages