Error when changing font size for mispelled text in notes

Noticed that when in notes and a word is underlined by spell checker and you change the font size, a error message pops up.

554762: ERROR: line 188: Unhandled exception
Traceback (most recent call last):
  File "/home/moorob/Gramps/gramps/gui/widgets/", line 1078, in <lambda>
    return lambda x: func(x, value)
  File "/home/moorob/Gramps/gramps/gui/widgets/", line 865, in _on_valueaction_changed
    self.textbuffer.apply_style(style, value)
  File "/home/moorob/Gramps/gramps/gui/widgets/", line 690, in apply_style
    self._apply_style_to_selection(style, value)
  File "/home/moorob/Gramps/gramps/gui/widgets/", line 483, in _apply_style_to_selection
  File "/home/moorob/Gramps/gramps/gui/widgets/", line 495, in _remove_style_from_selection
    if tag_name.startswith(str(style)):
AttributeError: 'NoneType' object has no attribute 'startswith'
You need to turn off spell check before making change and then you can turn it back on.

This also happens in the Note addon gramplet. When I just ran into this error using the example.gramps tree, I thought the problem was related to Linked text… but it was spellcheck not linked text.

Have you filed a bug report? filed 0013282: Note Editor error styling text on spelling error

reproduced in Gramps 5.2.1 on Fedora 37

See pull request #1718.

1 Like

That fixed it. Thanks @Nick-Hall !!