Skip to content

Instantly share code, notes, and snippets.

@evdcush
Created March 6, 2024 09:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evdcush/7c67c3ecb4e525326f8bfd80988be1c7 to your computer and use it in GitHub Desktop.
Save evdcush/7c67c3ecb4e525326f8bfd80988be1c7 to your computer and use it in GitHub Desktop.
FIX: Typecatcher Ubuntu package for installing fonts from Google fonts

Your error:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/typecatcher_lib/Application.py", line 30, in on_activate
    self.window = TypeCatcherWindow.TypeCatcherWindow()
  File "/usr/lib/python3/dist-packages/typecatcher_lib/Window.py", line 47, in __new__
    builder = get_builder('TypeCatcherWindow')
  File "/usr/lib/python3/dist-packages/typecatcher_lib/helpers.py", line 44, in get_builder
    builder.add_from_file(ui_filename)
  File "/usr/lib/python3/dist-packages/typecatcher_lib/Builder.py", line 86, in add_from_file
    ele_widgets = tree.getiterator("object")
AttributeError: 'ElementTree' object has no attribute 'getiterator'

The fix:

Backup the file.

cp /usr/lib/python3/dist-packages/typecatcher_lib/Builder.py ~/Builder.bkp.py

Replace the problem lines.

sudo sed -i 's/tree.getiterator/tree.iter/g' /usr/lib/python3/dist-packages/typecatcher_lib/Builder.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment