Hello Thomas,

tbp1...@gmail.com schrieb am Donnerstag, 16. Mai 2024 um 03:30:52 UTC+2:

The PR has been merged into the devel branch.  Update your clone repo and 
you should be good to go.

 
Thanks a lot, your PR has resolved the issue !
 

There is a possibility that on some Linux systems you have to install  
*python3-enchant* using operating system installer.  Debian is one of them, 
I think.  So (untested) on debian-based distros:

sudo apt-get install python3-enchant


This was not necessary for my PyVE of Leo's GitHub version ...
 

The reason is that on Windows the binary files needed are included in the 
PyPi install of pyenchant, but on Linux you have to install a system .so 
library and get it hooked up to the Python code.  The system's package does 
all that.  There's probably something similar for non-Debian-based distros.
On Wednesday, May 15, 2024 at 6:52:48 PM UTC-4 Thomas Passin wrote:

I just created a PR to fix this bug.

On Wednesday, May 15, 2024 at 6:33:36 PM UTC-4 Thomas Passin wrote:

I'm getting a better idea of what may be going on.  Leo's spell checker 
tries to load the pyenchant module (which contains a speller and some word 
dictionaries). If that is not available, then the code branches to the code 
with the bug.  On Linux, in this condition, Leo did open its GUI window but 
it was very small.  When I expanded it an empty outline was displayed, 
although it was called "workbook".

When I fixed the bug by deleting the ".d", and made sure that enchant was 
not available, then Leo opened normally, although it did not have a 
spell-checking tab, which makes sense.

Perhaps pyenchant is not available for the Mac Python distribution?  It can 
be checked for by by activating your venv and issuing the command

python3 -m pip list |grep "pyenchant".


It was already available - See log below: 

    user@debian-leo-study-vm:~$ 
    user@debian-leo-study-vm:~$ cd PyVE/GitHub/Leo/
    (Leo) user@debian-leo-study-vm:~/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$ python3 -m pip list | 
grep "pyenchant"
    pyenchant                     3.2.2
    (Leo) user@debian-leo-study-vm:~/PyVE/GitHub/Leo$ 

I double-checked WHY - and - found out that it is part of Leo's required 
packages - See

* https://github.com/leo-editor/leo-editor/blob/devel/requirements.txt
 

If it's listed then open a Python interpreter session and try to import it:

import enchant  # Not a typo - right name is "enchant", not "pyenchant"

If it's not there, you can search on line to see if it can be obtained for 
the Mac.  In the meantime you can get Leo working right by finding the 
python file named in the error message, finding that line, and deleting the 
characters ".d".  Save the file.  Leo should then run correctly.


On Wednesday, May 15, 2024 at 5:34:11 PM UTC-4 Thomas Passin wrote:



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


Funny, that looks like a bug in the devel branch that was fixed already. 


Once again : Thanks a lot for resolving this issue !

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/c239baa3-e6f0-42bb-909c-b187ea598365n%40googlegroups.com.

Reply via email to