Hello Thomas,

Am Mi., 15. Mai 2024 um 15:28 Uhr schrieb Thomas Passin <[email protected]
>:

> It's hard for me to know what you want to convey with these long
> transcripts.
>

I'm sorry !

I just realized right now , that Gmail did not keep' my selection of
"Courier New" for all parts of the logs.


> It would be better if they were edited, or at least if you would point out
> results that you don't like or don't understand.
>

Again sorry, if my msg / point was not clear enough - but - I thought I had
state it ...

"""
I'd like to understand, why the case of 'Leo from GitHub in a PyVE' is no
longer working ?  - It has worked on Linux (Debian & Fedora) up until Leo
version 6.7.7 (maybe evern 6.7.8) !
"""


> But I can see a few things, I think:
>
> 1. Installing Leo's dependencies using pip -r requirements.txt does not
> install Leo itself.  It does not create those scripts in the venv's bin
> directory.  It only installs the modules and packages that Leo needs.  You
> have to install Leo using pip for that (while the venv is active).  For
> example, in my "leo" venv, which has Leo's dependencies but into which I
> haven't installed leo using pip, there is no *leo* script:
>
> (leo) tom@thomas-xubuntu-VirtualBox:~/venv$ ls leo/bin/ |grep "leo"
> # there was no result
>

Yes, that confirms, what I stated in my logs as well.


> 2. Using python3 -m leo.core.runLeo, when you have cd'ed to your github's
> leo-editor directory, finds Leo's files because Python starts looking for
> files starting at the current directory.  If you export the PYTHONPATH
> shell variable, then Python will start by looking there.  That's why I
> recommend using a script that sets the variable.  Then you don't have to
> remember to cd to the right directory first.
>

Thanks, that was new / unkown to me - and - explains what I reported in the
previous "Log-003".


> 3. Even after you have activated your venv, the shell will not find its
> *leo* script because there isn't one. It won't be there unless you
> pip-install Leo while the venv is activated. The results from running
> *which* show that.  You could also use *whereis*, and get the same
> result.  Even if you installed Leo in the venv and started Leo using the
> venv's *leo* script, Leo would be using the Leo code in the venv, not the
> code in your github repo.
>

Could / should Leo's documentation be improved ? - I did exactly what it
says [1] now.


> 4. Your transcript shows that Leo started when you had cd'ed to its repo
> directory.  But I can only see Leo's startup output to the console. That
> output looks normal.  But it doesn't tell me if the Leo window actually
> opened and worked.  Did it?
>

No !

If I move down into "~/PyVE/GitHub/Leo/leo-editor"  - and - try to 'really'
run Leo, it fails with the following traceback - See "Log-001".

With kind regards,

Viktor

---

[1]
https://leo-editor.github.io/leo-editor/installing.html#installing-leo-from-github

### Log-001

user@debian-leo-study-vm:~$ cd PyVE/GitHub/Leo/
user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ source bin/activate
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo$
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ cd leo-editor/
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo/leo-editor$
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo/leo-editor$ python3 -m
leo.core.runLeo &
[1] 878
(Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo/leo-editor$ setting leoID
from os.getenv('USER'): 'user'
Leo 6.7.9-devel, devel branch, build fb85027eac
2024-05-13 16:10:23 -0500
Python 3.11.2, PyQt version 6.7.0
linux
Can not load session
Traceback (most recent call last):

  File "/home/user/PyVE/GitHub/Leo/leo-editor/leo/core/leoApp.py", line
2307, in doPostPluginsInit
    g.app.sessionManager.load_session(c1, aList)

  File "/home/user/PyVE/GitHub/Leo/leo-editor/leo/core/leoSessions.py",
line 72, in load_session
    g.openWithFileName(fn, gui=g.app.gui, old_c=c)

  File "/home/user/PyVE/GitHub/Leo/leo-editor/leo/core/leoGlobals.py", line
3238, in openWithFileName
    return g.app.loadManager.openWithFileName(fileName, gui, old_c)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/user/PyVE/GitHub/Leo/leo-editor/leo/core/leoApp.py", line
3010, in openWithFileName
    return lm.openExistingLeoFile(file_name, gui, old_c)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/user/PyVE/GitHub/Leo/leo-editor/leo/core/leoApp.py", line
3209, in openExistingLeoFile
    c = g.app.newCommander(
        ^^^^^^^^^^^^^^^^^^^

  File "/home/user/PyVE/GitHub/Leo/leo-editor/leo/core/leoApp.py", line
1516, in newCommander
    c = leoCommands.Commands(fileName,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/user/PyVE/GitHub/Leo/leo-editor/leo/core/leoCommands.py",
line 165, in __init__
    c.finishCreate()  # Slightly slow.
    ^^^^^^^^^^^^^^^^

  File "/home/user/PyVE/GitHub/Leo/leo-editor/leo/core/leoCommands.py",
line 467, in finishCreate
    c.frame.log.finishCreate()

  File "/home/user/PyVE/GitHub/Leo/leo-editor/leo/plugins/qt_frame.py",
line 2598, in finishCreate
    c.spellCommands.openSpellTab()

  File
"/home/user/PyVE/GitHub/Leo/leo-editor/leo/commands/spellCommands.py", line
443, in openSpellTab
    self.handler = SpellTabHandler(c, tabName)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File
"/home/user/PyVE/GitHub/Leo/leo-editor/leo/commands/spellCommands.py", line
675, in __init__
    self.spellController = DefaultWrapper(c)  # type:ignore
                           ^^^^^^^^^^^^^^^^^

  File
"/home/user/PyVE/GitHub/Leo/leo-editor/leo/commands/spellCommands.py", line
185, in __init__
    g.app.spellDict = DefaultDict().d  # 2024/04/09: bug fix.
                      ^^^^^^^^^^^^^^^

AttributeError: 'DefaultDict' object has no attribute 'd'

Can not create workbook
Traceback (most recent call last):

  File "/home/user/PyVE/GitHub/Leo/leo-editor/leo/core/leoApp.py", line
2321, in doPostPluginsInit
    c1 = lm.openWorkBook()
         ^^^^^^^^^^^^^^^^^

  File "/home/user/PyVE/GitHub/Leo/leo-editor/leo/core/leoApp.py", line
2365, in openWorkBook
    c = g.openWithFileName(fn, gui=g.app.gui, old_c=None)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/user/PyVE/GitHub/Leo/leo-editor/leo/core/leoGlobals.py", line
3238, in openWithFileName
    return g.app.loadManager.openWithFileName(fileName, gui, old_c)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/user/PyVE/GitHub/Leo/leo-editor/leo/core/leoApp.py", line
3012, in openWithFileName
    return lm.openEmptyLeoFile(file_name, gui, old_c)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/user/PyVE/GitHub/Leo/leo-editor/leo/core/leoApp.py", line
3167, in openEmptyLeoFile
    c = g.app.newCommander(
        ^^^^^^^^^^^^^^^^^^^

  File "/home/user/PyVE/GitHub/Leo/leo-editor/leo/core/leoApp.py", line
1516, in newCommander
    c = leoCommands.Commands(fileName,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/home/user/PyVE/GitHub/Leo/leo-editor/leo/core/leoCommands.py",
line 165, in __init__
    c.finishCreate()  # Slightly slow.
    ^^^^^^^^^^^^^^^^

  File "/home/user/PyVE/GitHub/Leo/leo-editor/leo/core/leoCommands.py",
line 467, in finishCreate
    c.frame.log.finishCreate()

  File "/home/user/PyVE/GitHub/Leo/leo-editor/leo/plugins/qt_frame.py",
line 2598, in finishCreate
    c.spellCommands.openSpellTab()

  File
"/home/user/PyVE/GitHub/Leo/leo-editor/leo/commands/spellCommands.py", line
443, in openSpellTab
    self.handler = SpellTabHandler(c, tabName)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File
"/home/user/PyVE/GitHub/Leo/leo-editor/leo/commands/spellCommands.py", line
675, in __init__
    self.spellController = DefaultWrapper(c)  # type:ignore
                           ^^^^^^^^^^^^^^^^^

  File
"/home/user/PyVE/GitHub/Leo/leo-editor/leo/commands/spellCommands.py", line
185, in __init__
    g.app.spellDict = DefaultDict().d  # 2024/04/09: bug fix.
                      ^^^^^^^^^^^^^^^

AttributeError: 'DefaultDict' object has no attribute 'd'

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAAeSrGJf2o7fqQ6JQS6x%2BMQdhAoG4txFDZ4ge8FHnHTSKzq4jA%40mail.gmail.com.

Reply via email to