fails to handle D-Bus error in get_text_attributes_at_offset
Orca Version
Orca 46~beta, git main
Steps to Reproduce the Problem
- Start Orca as screen reader
- Open an Application with a working GetStringAtOffset, but no GetAttributeRun – a Gtk.Text as a child of Railway's Adw.EntryRow built with camelCaseNick/gtk@4ec9a2a3 in my case
- Focus said widget
- Hear nothing
Expected Behavior
Read out loud the details about this accessible text incl. its content.
Actual Behavior
You get the following logs:
Traceback (most recent call last):
File "<build install path>/lib/python3/dist-packages/orca/generator.py", line 262, in generate
result = eval(formatting, globalsDict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<string>", line 1, in <module>
NameError: name 'currentLineText' is not defined
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<build install path>/lib/python3/dist-packages/orca/generator.py", line 273, in generate
globalsDict[arg] = self._methodsDict[arg](obj, **args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<build install path>/lib/python3/dist-packages/orca/speech_generator.py", line 1222, in _generateCurrentLineText
split = self._script.utilities.splitSubstringByLanguage(obj, startOffset, endOffset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<build install path>/lib/python3/dist-packages/orca/script_utilities.py", line 2058, in splitSubstringByLanguage
allSubstrings = self.getLanguageAndDialectFromTextAttributes(obj, start, end)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<build install path>/lib/python3/dist-packages/orca/script_utilities.py", line 2091, in getLanguageAndDialectFromTextAttributes
language = attrs.get("language", "")
^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get'
Edited by Markus Göllnitz