Re: Leo requires tkinter module to be configured in Python environment

2020-01-01 Thread Brian Theado
Viktor,

On Tue, Dec 31, 2019 at 11:45 AM Viktor Ransmayr 
wrote:

> You were right with your assumption. - I tried it both with Leo 6.1-final
> as well as 6.2-b1-devel - and - it works as you suspected.
>
> In both cases it does throw a type error related to ...\spellCommands.py -
> but - it does open the workbook.leo outline.
>

Looks like you ran into issue
https://github.com/leo-editor/leo-editor/issues/1453. I just posted a
comment there stating that the attempted fix for that issue did not work.


> Thanks a lot for your explanation!
>
> With kind regards,
>
> Viktor
>
> PS: Just for the record - Here's the startup log for Leo 6.2-b1-devel:
>
> Leo Log Window
> Leo 6.2-b1-devel
> Python 3.7.6, PyQt version 5.12.6
> Windows 10 AMD64 (build 10.0.18362) SP0
> current dir: C:/Users/Viktor/pyve/github/Leo-devel
> load dir: C:/users/viktor/pyve/github/leo-devel/devel/leo-editor-devel/leo
> /core
> global config dir: C:/users/viktor/pyve/github/leo-devel/devel/leo-editor-
> devel/leo/config
> home dir: C:/Users/Viktor
> reading settings in C:/users/viktor/pyve/github/leo-devel/devel/leo-editor
> -devel/leo/config/leoSettings.leo
> Do spellpyx.txt file found
> unexpected error creating: None
> Traceback (most recent call last):
>
>   File
> "c:\users\viktor\pyve\github\leo-devel\devel\leo-editor-devel\leo\commands\spellCommands.py"
> , line 62, in create
> f = open(fn, mode='wb')
>
> TypeError: expected str, bytes or os.PathLike object, not NoneType
>
> reading settings in C:/users/viktor/pyve/github/leo-devel/devel/leo-editor
> -devel/leo/doc/CheatSheet.leo
>
>
>
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/leo-editor/0214f56c-76bf-4c44-a55e-cddb740333ca%40googlegroups.com
> 
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAO5X8CwbwvcQKhQ_QaL4P1HPtknqZ8RHEEvbrsmC%2B0E2qTXULg%40mail.gmail.com.


Re: Leo requires tkinter module to be configured in Python environment

2019-12-31 Thread Viktor Ransmayr
Hello Vitalije,

Am Montag, 30. Dezember 2019 22:03:56 UTC+1 schrieb vitalije:
>
> This is the remaining question I'd really would like to get an explanation.
>>
>
> Most likely Tkinter is used only to ask user for leo-id if there is no one 
> to be found. It is located in the ~/.leo folder. When you restore your 
> folder, Leo knwos your leo-id and doesn't need to ask you so there is no 
> need for Tkinter.
>
> Try adding an empty ~/.leo folder and put the `.leoID.txt` file inside, 
> and in this file just write your login name.
>

You were right with your assumption. - I tried it both with Leo 6.1-final 
as well as 6.2-b1-devel - and - it works as you suspected.

In both cases it does throw a type error related to ...\spellCommands.py - 
but - it does open the workbook.leo outline.

Thanks a lot for your explanation!

With kind regards,

Viktor

PS: Just for the record - Here's the startup log for Leo 6.2-b1-devel:

Leo Log Window
Leo 6.2-b1-devel
Python 3.7.6, PyQt version 5.12.6
Windows 10 AMD64 (build 10.0.18362) SP0
current dir: C:/Users/Viktor/pyve/github/Leo-devel
load dir: C:/users/viktor/pyve/github/leo-devel/devel/leo-editor-devel/leo/
core
global config dir: C:/users/viktor/pyve/github/leo-devel/devel/leo-editor-
devel/leo/config
home dir: C:/Users/Viktor
reading settings in C:/users/viktor/pyve/github/leo-devel/devel/leo-editor-
devel/leo/config/leoSettings.leo
Do spellpyx.txt file found
unexpected error creating: None
Traceback (most recent call last):

  File 
"c:\users\viktor\pyve\github\leo-devel\devel\leo-editor-devel\leo\commands\spellCommands.py"
, line 62, in create
f = open(fn, mode='wb')

TypeError: expected str, bytes or os.PathLike object, not NoneType

reading settings in C:/users/viktor/pyve/github/leo-devel/devel/leo-editor-
devel/leo/doc/CheatSheet.leo




-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/0214f56c-76bf-4c44-a55e-cddb740333ca%40googlegroups.com.


Re: Leo requires tkinter module to be configured in Python environment

2019-12-30 Thread vitalije

>
> This is the remaining question I'd really would like to get an explanation.
>

Most likely Tkinter is used only to ask user for leo-id if there is no one 
to be found. It is located in the ~/.leo folder. When you restore your 
folder, Leo knwos your leo-id and doesn't need to ask you so there is no 
need for Tkinter.

Try adding an empty ~/.leo folder and put the `.leoID.txt` file inside, and 
in this file just write your login name.

HTH Vitalije

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/226d1c19-e752-43fc-8ddb-2c2bc024f0af%40googlegroups.com.


Re: Leo requires tkinter module to be configured in Python environment

2019-12-30 Thread Viktor Ransmayr
Hello Edward, hello Matt,

Am Sa., 28. Dez. 2019 um 19:26 Uhr schrieb Viktor Ransmayr <
viktor.ransm...@gmail.com>:

>
> I just noticed something interesting/ strange/ weird.
>
> Actually two issues:
>
> First: Leo requires that the tkinter module is configured in the Python
> installation.
>
> (Backgound: I just upgraded to Python 3.7.6 - and - decided to de-select
> everything but pip ...)
>
> Second: I noticed this only, when I started w/o an existing '~/.leo'
> directory.
>
> The traceback I receive is:
>
> ...
>
> As soon as I re-use my previously saved '~/.leo' directory, the
> ModuleNotFoundError disappears ...
>
> Can you please explain
>
> * why the module 'tkinter' is required, although PyQt is used as the GUI
> framework - and -
>

Analyzing Leo's content & dependencies a bit more, I found at least one
reason myself:

* Leo does support the GUI-Options: [ browser | console | null | qt ] - and
- at least the console option does require 'tkinter' as well.

So this now looks only like a possible future 'refactoring' task to me, in
case a split into smaller sub-components/-packages is ever planned for Leo
...


> * secondly, why the problem goes away, if I'm using "old/ saved" '~/.leo'
> content ...
>

This is the remaining question I'd really would like to get an explanation.

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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAAeSrGL1Dz_6kKVhTsG2HW5Wn%2B7_LJi9p_-5jzUNKzBKufgCOA%40mail.gmail.com.


Leo requires tkinter module to be configured in Python environment

2019-12-28 Thread Viktor Ransmayr
Hello Edward, hello Matt,

I just noticed something interesting/ strange/ weird.

Actually two issues:

First: Leo requires that the tkinter module is configured in the Python 
installation.

(Backgound: I just upgraded to Python 3.7.6 - and - decided to de-select 
everything but pip ...)

Second: I noticed this only, when I started w/o an existing '~/.leo' 
directory.

The traceback I receive is:

(Leo-devel) PS C:\Users\Viktor\pyve\github\Leo-devel> leo-m

--global-docks: False

Traceback (most recent call last):
  File "C:\Users\Viktor\PyVE\GitHub\Leo-devel\Scripts\leo-m-script.py", 
line 11, in 
load_entry_point('leo', 'console_scripts', 'leo-m')()
  File 
"c:\users\viktor\pyve\github\leo-devel\devel\leo-editor-devel\leo\core\runLeo.py",
 
line 73, in run
g.app.loadManager.load(fileName, pymacs)
  File 
"c:\users\viktor\pyve\github\leo-devel\devel\leo-editor-devel\leo\core\leoApp.py",
 
line 2512, in load
lm.doPrePluginsInit(fileName, pymacs)
  File 
"c:\users\viktor\pyve\github\leo-devel\devel\leo-editor-devel\leo\core\leoApp.py",
 
line 2691, in doPrePluginsInit
lm.initApp(verbose)
  File 
"c:\users\viktor\pyve\github\leo-devel\devel\leo-editor-devel\leo\core\leoApp.py",
 
line 2914, in initApp
g.app.setLeoID(verbose=verbose)
  File 
"c:\users\viktor\pyve\github\leo-devel\devel\leo-editor-devel\leo\core\leoApp.py",
 
line 1157, in setLeoID
self.setIdFromDialog()
  File 
"c:\users\viktor\pyve\github\leo-devel\devel\leo-editor-devel\leo\core\leoApp.py",
 
line 1244, in setIdFromDialog
dialog = g.TkIDDialog()
  File 
"c:\users\viktor\pyve\github\leo-devel\devel\leo-editor-devel\leo\core\leoGlobals.py",
 
line 526, in __init__
super().__init__(self.title, self.message)
  File 
"c:\users\viktor\pyve\github\leo-devel\devel\leo-editor-devel\leo\core\leoGlobals.py",
 
line 446, in __init__
self.createTopFrame()
  File 
"c:\users\viktor\pyve\github\leo-devel\devel\leo-editor-devel\leo\core\leoGlobals.py",
 
line 538, in createTopFrame
import tkinter as Tk
ModuleNotFoundError: No module named 'tkinter'
(Leo-devel) PS C:\Users\Viktor\pyve\github\Leo-devel>

As soon as I re-use my previously saved '~/.leo' directory, the 
ModuleFoundError disappears ...

Can you please explain 

* why the module 'tkinter' is required, although PyQt is used as the GUI 
framework - and - 

* secondly, why the problem goes away, if I'm using "old/ saved" '~/.leo' 
content ...

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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/8a779c7d-b3df-442a-addf-428adb773a79%40googlegroups.com.