olivierkes / manuskript

A open-source tool for writers
http://www.theologeek.ch/manuskript
GNU General Public License v3.0
1.71k stars 226 forks source link

crash on optional spellcheck #1243

Closed librafrog closed 7 months ago

librafrog commented 8 months ago

I have a glitch, in which when I right click to correct a found spellcheck error, the app just crushesh and exits I have the following extra packages /scripts/

manuscript log
2023-10-31 12:30:59,986 - manuskript.logging - CRITICAL - An unhandled exception has occurred!
Traceback (most recent call last):
  File "C:\evolve\Next Up\manuskript\bin\..\manuskript\ui\views\textEditView.py", line 496, in contextMenuEvent
    popup_menu = self.createStandardContextMenu()
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\evolve\Next Up\manuskript\bin\..\manuskript\ui\views\MDEditCompleter.py", line 71, in createStandardContextMenu
    menu = MDEditView.createStandardContextMenu(self)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\evolve\Next Up\manuskript\bin\..\manuskript\ui\views\textEditView.py", line 590, in createStandardContextMenu
    suggestions = self._dict.findSuggestions(text, cursor.selectionStart(), cursor.selectionEnd())
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\evolve\Next Up\manuskript\bin\..\manuskript\functions\spellchecker.py", line 220, in findSuggestions
    match.replacements = self.getSuggestions(word)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\evolve\Next Up\manuskript\bin\..\manuskript\functions\spellchecker.py", line 366, in getSuggestions
    if word in candidates:
       ^^^^^^^^^^^^^^^^^^
TypeError: argument of type 'NoneType' is not iterable

Versions :information_source: if appropreate Python 3.11.5 PyQt 5.15.9 Qt 5.15.2 ; Program: 0.15.0

TheJackiMonster commented 7 months ago

Seems to be a duplicate of #1224 which is already addressed.