Leo's console GUI not longer working in 6.0 beta 1

74 views
Skip to first unread message

Viktor Ransmayr

unread,
Jun 21, 2019, 12:22:11 PM6/21/19
to leo-editor
Hello Edward,

I've started to check out the various GUI variants that Leo supports in 6.0 beta 1 as well.

Contrary to 5.9, where I was able to resolve the initial problem with "leo-curses", it is no longer working in 6.0 beta 1.

According to the traceback messages it's related to the recent changes related to moving to Python 3 only ...

Assuming that I don't hear otherwise from you, I'll create a GitHub issue for this problem later in the day!

<Log-1>

(VE-for-Leo-6-0-b1) PS C:\Users\Viktor\pyve\VE-for-Leo-6-0-b1> pip show leo
Name: leo
Version: 6.0b1
Summary: An IDE, PIM and Outliner
Home-page: http://leoeditor.com
Author: Edward K. Ream
Author-email: edre...@gmail.com
License: MIT License
Location: c:\users\viktor\pyve\ve-for-leo-6-0-b1\lib\site-packages
Requires: six, PyQtWebEngine, sphinx, flexx, pylint, PyQt5, meta, pyflakes, nbformat, future, docutils
Required-by:
(VE-for-Leo-6-0-b1) PS C:\Users\Viktor\pyve\VE-for-Leo-6-0-b1> leo-console
Traceback (most recent call last):

  File "c:\users\viktor\pyve\ve-for-leo-6-0-b1\lib\site-packages\leo\core\leoApp.py", line 1009, in createCursesGui
    import _curses

ModuleNotFoundError: No module named '_curses'

can not import _curses.
Windows: pip install windows-curses
(VE-for-Leo-6-0-b1) PS C:\Users\Viktor\pyve\VE-for-Leo-6-0-b1>

</Log-1>

<Log-2a> failure for 6.0 beta 1

(VE-for-Leo-6-0-b1) PS C:\Users\Viktor\pyve\VE-for-Leo-6-0-b1> pip install windows-curses
Collecting windows-curses
  Using cached https://files.pythonhosted.org/packages/1e/75/e390d806df17b30f3617561dc1d6782d68ca608244cdee570019e3e56452/windows_curses-1.1-cp36-cp36m-win_amd64.whl
Installing collected packages: windows-curses
Successfully installed windows-curses-1.1
(VE-for-Leo-6-0-b1) PS C:\Users\Viktor\pyve\VE-for-Leo-6-0-b1> leo-console
cursesGui.py: Tk required for clipboard handling.
Traceback (most recent call last):

  File "c:\users\viktor\pyve\ve-for-leo-6-0-b1\lib\site-packages\leo\plugins\cursesGui2.py", line 36, in <module>
    from tkinter import Tk # Python 3

ModuleNotFoundError: No module named 'tkinter'


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "c:\users\viktor\pyve\ve-for-leo-6-0-b1\lib\site-packages\leo\core\leoApp.py", line 1018, in createCursesGui
    import leo.plugins.cursesGui2 as cursesGui2

  File "c:\users\viktor\pyve\ve-for-leo-6-0-b1\lib\site-packages\leo\plugins\cursesGui2.py", line 39, in <module>
    from Tkinter import Tk # Python 2

ModuleNotFoundError: No module named 'Tkinter'

can not create curses gui.
(VE-for-Leo-6-0-b1) PS C:\Users\Viktor\pyve\VE-for-Leo-6-0-b1>

</Log-2a>

<Log-2b> success for 5.9

(VE4Leo) PS C:\Users\Viktor\pyve\VE4Leo> pip install windows-curses
Collecting windows-curses
  Downloading https://files.pythonhosted.org/packages/1e/75/e390d806df17b30f3617561dc1d6782d68ca608244cdee570019e3e56452/windows_curses-1.1-cp36-cp36m-win_amd64.whl (68kB)
     |████████████████████████████████| 71kB 770kB/s
Installing collected packages: windows-curses
Successfully installed windows-curses-1.1
(VE4Leo) PS C:\Users\Viktor\pyve\VE4Leo> leo-console

cursesGui.py: Tk required for clipboard handling.
loading npyscreen
Leo 5.9-b2, build 20190409061733, Tue Apr  9 06:17:32 UTC 2019
wrote C:/Users/Viktor/.leo/leo.session
(VE4Leo) PS C:\Users\Viktor\pyve\VE4Leo>

</Log-2b>

With kind regards,

Viktor

Edward K. Ream

unread,
Jun 21, 2019, 1:01:20 PM6/21/19
to leo-editor

On Fri, Jun 21, 2019 at 11:22 AM Viktor Ransmayr <viktor....@gmail.com> wrote:

Thanks for this testing.  I'll look forward to the new issue.  This must be fixed asap.

Edward

Viktor Ransmayr

unread,
Jun 21, 2019, 1:15:46 PM6/21/19
to leo-e...@googlegroups.com
Hello Edward,

Am Fr., 21. Juni 2019 um 19:01 Uhr schrieb Edward K. Ream <edre...@gmail.com>:
> On Fri, Jun 21, 2019 at 11:22 AM Viktor Ransmayr <viktor....@gmail.com> wrote:
>
> Thanks for this testing. I'll look forward to the new issue. This must be fixed asap.

See https://github.com/leo-editor/leo-editor/issues/1223

With kind regards,

Viktor

Edward K. Ream

unread,
Jun 21, 2019, 1:29:43 PM6/21/19
to leo-editor
On Friday, June 21, 2019 at 12:15:46 PM UTC-5, Viktor Ransmayr wrote:

See https://github.com/leo-editor/leo-editor/issues/1223

Thanks.  Fixed at rev 7b322eb by changing `import _curses` to `import curses` in one place.

This kind of python 3 tweak will soon become a distant memory.

Edward

Viktor Ransmayr

unread,
Jun 21, 2019, 4:30:39 PM6/21/19
to leo-editor
Hello Edward,
Thanks a lot for this quick turn-around! - I'll update my virtual environment with the latest changes on GitHub tomorrow ...

With kind regards,

Viktor

Edward K. Ream

unread,
Jun 21, 2019, 5:23:22 PM6/21/19
to leo-editor
On Fri, Jun 21, 2019 at 3:30 PM Viktor Ransmayr <viktor....@gmail.com> wrote:

> Thanks a lot for this quick turn-around! - I'll update my virtual environment with the latest changes on GitHub tomorrow ...

You're welcome. Thanks again for your testing.

Edward

Viktor Ransmayr

unread,
Jun 22, 2019, 2:43:20 AM6/22/19
to leo-e...@googlegroups.com
Hello Edward,
For me the problem still exists. - I've provided the necessary information in

* https://github.com/leo-editor/leo-editor/issues/1223#issuecomment-504636322

BTW, what's the expected procedure/ workflow in such a situation?

Would you prefer me to open a new issue - or - do you re-open the closed issue?

With kind regards,

Viktor

Edward K. Ream

unread,
Jun 22, 2019, 3:38:51 AM6/22/19
to leo-editor
On Sat, Jun 22, 2019 at 1:43 AM Viktor Ransmayr <viktor....@gmail.com> wrote:


For me the problem still exists. - I've provided the necessary information in

* https://github.com/leo-editor/leo-editor/issues/1223#issuecomment-504636322

BTW, what's the expected procedure/ workflow in such a situation?

Would you prefer me to open a new issue - or - do you re-open the closed issue?

In this case, I believe you should fix your virtual environment.  Please fix the problem at your end, without reopening the issue or creating a new issue.

Edward

Viktor Ransmayr

unread,
Jun 22, 2019, 5:08:54 AM6/22/19
to leo-e...@googlegroups.com
Hello Edward,
What needs to be explained first is why Leo, within the same VE, using
Qt as the GUI, is starting ...

I'll do the necessary investigation on my side!

With kind regards,

Viktor

Viktor Ransmayr

unread,
Jun 22, 2019, 6:55:20 AM6/22/19
to leo-e...@googlegroups.com
Hello Edward, Matt & anybody else in the Leo Community,

Am Sa., 22. Juni 2019 um 11:08 Uhr schrieb Viktor Ransmayr
<viktor....@gmail.com>:
A short status update:

I can fully re-produce the same behaviour I experience with Leo
6.0-b2-devel in the existing VE in a new VE - and - where in addition
I ensured that every step was correct (at least to what I'd expected
;-)

Going forward I see two options:

Option #1: Delete my existing Python 3.6 environment on Windows 10 -
and - start from scratch.

Option #2: Try some other procedures & steps recommended by you before.

I'll wait until tomorrow morning before making a decision ...

With kind regards,

Viktor

Edward K. Ream

unread,
Jun 22, 2019, 7:56:04 AM6/22/19
to leo-editor
On Sat, Jun 22, 2019 at 5:55 AM Viktor Ransmayr <viktor....@gmail.com> wrote:
Hello Edward, Matt & anybody else in the Leo Community,

Going forward I see two options:

Option #1: Delete my existing Python 3.6 environment on Windows 10 -
and - start from scratch.

Option #2: Try some other procedures & steps recommended by you before.

I'll wait until tomorrow morning before making a decision ...

Good idea.

Edward

Viktor Ransmayr

unread,
Jun 22, 2019, 10:02:31 AM6/22/19
to leo-e...@googlegroups.com
Hello Edward & Matt

Am Sa., 22. Juni 2019 um 12:55 Uhr schrieb Viktor Ransmayr
<viktor....@gmail.com>:
> Hello Edward, Matt & anybody else in the Leo Community,
> Am Sa., 22. Juni 2019 um 11:08 Uhr schrieb Viktor Ransmayr <viktor....@gmail.com>:
> > Am Sa., 22. Juni 2019 um 09:38 Uhr schrieb Edward K. Ream <edre...@gmail.com>:
> > > On Sat, Jun 22, 2019 at 1:43 AM Viktor Ransmayr <viktor....@gmail.com> wrote:
> > >> For me the problem still exists. - I've provided the necessary information in
> > >>
> > >> * https://github.com/leo-editor/leo-editor/issues/1223#issuecomment-504636322
> > >>
> > >> BTW, what's the expected procedure/ workflow in such a situation?
> > >>
> > >> Would you prefer me to open a new issue - or - do you re-open the closed issue?
> > >
> > > In this case, I believe you should fix your virtual environment. Please fix the problem at your end, without reopening the issue or creating a new issue.
> >
> > What needs to be explained first is why Leo, within the same VE, using
> > Qt as the GUI, is starting ...
> >
> > I'll do the necessary investigation on my side!
>
> A short status update:
>
> I can fully re-produce the same behaviour I experience with Leo
> 6.0-b2-devel in the existing VE in a new VE - and - where in addition
> I ensured that every step was correct (at least to what I'd expected
> ;-)

Another status update & now it get's interesting again for you !

I am able to demonstrate that leo-console is working correctly in a
new VE if I'm using the latest released version of Leo at PyPI. - See
attached logs:

To me this proves that there's nothing wrong within my Python 3.6
environment - and - that the problem is somewhere in Leo and/or the
combination of using pip to install the latest Leo-Development-Archive
from GitHub.

Please comment!

With kind regards,

Viktor

### Here are the detailed steps I performed: ###

1) Create a new virtual environment.

* See "Log-001"

2) Install Leo 5.9 from PyPI

* See "Log-002"

3) Try to start leo-console.

* See "Log-003"
* As expected it did not suceed - but - leoApp.py is taken from the
correct path, i.e. the one inside the VE!

4) Install windows-curses from PyPI - and - re-try. - OK.

* See "Log-004"

###

< Log #1 >

(VE-Leo-from-PyPI) PS C:\Users\Viktor\pyve\VE-Leo-from-PyPI> pip list
Package Version
---------- -------
pip 19.1.1
setuptools 41.0.1
(VE-Leo-from-PyPI) PS C:\Users\Viktor\pyve\VE-Leo-from-PyPI>

</ Log #1 >

< Log #2 >

(VE-Leo-from-PyPI) PS C:\Users\Viktor\pyve\VE-Leo-from-PyPI> pip
install leo Collecting leo
Using cached https://files.pythonhosted.org/packages/5a/ff/412954d6ee5babbdb9f1ce2cfbc0def3b57af30bcd341f428ff129543337/leo-5.9-py2.py3-none-any.whl
Collecting pyflakes (from leo)
Using cached https://files.pythonhosted.org/packages/84/f2/ed0ffb887f8138a8fe5a621b8c0bb9598bfb3989e029f6c6a85ee66628ee/pyflakes-2.1.1-py2.py3-none-any.whl

< Delete similar entries >

Collecting MarkupSafe>=0.23 (from Jinja2>=2.3->sphinx->leo)
Using cached https://files.pythonhosted.org/packages/b9/82/833c7714951bff8f502ed054e6fbd8bd00e083d1fd96de6a46905cf23378/MarkupSafe-1.1.1-cp36-cp36m-win_amd64.whl
Installing collected packages: pyflakes, six, decorator,
ipython-genutils, traitlets, jupyter-core, attrs, pyrsistent,
jsonschema, nbformat, future, mccabe, isort, lazy-object-proxy, wrapt,
typed-ast, astroid, colorama, pylint, imagesize, pyparsing, packaging,
sphinxcontrib-devhelp, chardet, urllib3, idna, certifi, requests,
Pygments, sphinxcontrib-applehelp, pytz, babel, sphinxcontrib-qthelp,
sphinxcontrib-serializinghtml, snowballstemmer, MarkupSafe, Jinja2,
sphinxcontrib-htmlhelp, sphinxcontrib-jsmath, docutils, alabaster,
sphinx, PyQt5-sip, PyQt5, dialite, pscript, tornado, webruntime,
flexx, leo
Running setup.py install for pyrsistent ... done
Running setup.py install for wrapt ... done
Successfully installed Jinja2-2.10.1 MarkupSafe-1.1.1 PyQt5-5.12.2
PyQt5-sip-4.19.17 Pygments-2.4.2 alabaster-0.7.12 astroid-2.2.5
attrs-19.1.0 babel-2.7.0 certifi-2019.6.16 chardet-3.0.4
colorama-0.4.1 decorator-4.4.0 dialite-0.5.2 docutils-0.14 flexx-0.8.0
future-0.17.1 idna-2.8 imagesize-1.1.0 ipython-genutils-0.2.0
isort-4.3.20 jsonschema-3.0.1 jupyter-core-4.5.0
lazy-object-proxy-1.4.1 leo-5.9 mccabe-0.6.1 nbformat-4.4.0
packaging-19.0 pscript-0.7.1 pyflakes-2.1.1 pylint-2.3.1
pyparsing-2.4.0 pyrsistent-0.15.2 pytz-2019.1 requests-2.22.0
six-1.12.0 snowballstemmer-1.2.1 sphinx-2.1.2
sphinxcontrib-applehelp-1.0.1 sphinxcontrib-devhelp-1.0.1
sphinxcontrib-htmlhelp-1.0.2 sphinxcontrib-jsmath-1.0.1
sphinxcontrib-qthelp-1.0.2 sphinxcontrib-serializinghtml-1.1.3
tornado-6.0.2 traitlets-4.3.2 typed-ast-1.4.0 urllib3-1.25.3
webruntime-0.5.6 wrapt-1.11.2
(VE-Leo-from-PyPI) PS C:\Users\Viktor\pyve\VE-Leo-from-PyPI>

</ Log #2 >

< Log #3 >

(VE-Leo-from-PyPI) PS C:\Users\Viktor\pyve\VE-Leo-from-PyPI>
leo-console
Traceback (most recent call last):

File "c:\users\viktor\pyve\ve-leo-from-pypi\lib\site-packages\leo\core\leoApp.py",
line 1009, in createCursesGui
import _curses

ModuleNotFoundError: No module named '_curses'

can not import _curses.
Windows: pip install windows-curses
(VE-Leo-from-PyPI) PS C:\Users\Viktor\pyve\VE-Leo-from-PyPI>

</ Log #3 >

< Log #4 >

(VE-Leo-from-PyPI) PS C:\Users\Viktor\pyve\VE-Leo-from-PyPI> pip show
leo Name: leo
Version: 5.9
Summary: An IDE, PIM and Outliner
Home-page: http://leoeditor.com
Author: Edward K. Ream
Author-email: edre...@gmail.com
License: MIT License
Location: c:\users\viktor\pyve\ve-leo-from-pypi\lib\site-packages
Requires: flexx, sphinx, pylint, future, pyflakes, six, PyQt5,
docutils, nbformat
Required-by:
(VE-Leo-from-PyPI) PS C:\Users\Viktor\pyve\VE-Leo-from-PyPI> pip show
windows-curses Name: windows-curses
Version: 1.1
Summary: Support for the standard curses module on Windows
Home-page: http://bugs.python.org/issue2889
Author: UNKNOWN
Author-email: UNKNOWN
License: PSF2
Location: c:\users\viktor\pyve\ve-leo-from-pypi\lib\site-packages
Requires:
Required-by:
(VE-Leo-from-PyPI) PS C:\Users\Viktor\pyve\VE-Leo-from-PyPI>
leo-console
cursesGui.py: Tk required for clipboard handling.
loading npyscreen
Leo 5.9-b2, build 20190409061733, Tue Apr 9 06:17:32 UTC 2019
wrote C:/Users/Viktor/.leo/leo.session
(VE-Leo-from-PyPI) PS C:\Users\Viktor\pyve\VE-Leo-from-PyPI>

</ Log #4 >

Viktor Ransmayr

unread,
Jun 23, 2019, 8:50:13 AM6/23/19
to leo-e...@googlegroups.com
Hello everyone,

Am Sa., 22. Juni 2019 um 12:55 Uhr schrieb Viktor Ransmayr
I'll defer the execution of Option #1 to 2019-06-28 or a day later ...

This way I'll be able to upgrade to the latest fix version of Python
3.7 for my investigations of / with Leo 6.0 going forward.

With kind regards,

Viktor
Reply all
Reply to author
Forward
0 new messages