Skip to content

'NoneType' object has no attribute 'endswith' when some extensional scheme is used.

For example, Thunar (file manager) "supports" "computer:///" scheme, for example (also pcmanfm supports it), and when such scheme is used, catfish causes python traceback.

Step to reproduce:

  • Add one line: computer:/// computer:/// to ~/.config/gtk-3.0/bookmarks
  • Open catfish
  • Click the left "folder" selection, select "computer:///" bookmark
  • enter some text in search text bar

Results:

Traceback (most recent call last):
  File "/home/tasaka1/rpmbuild/fedora-specific/catfish/master/GIT/catfish/catfish/CatfishWindow.py", line 944, in get_suggestions
    for filename in self.suggestions_engine.run(keywords, folder, 10):
  File "/home/tasaka1/rpmbuild/fedora-specific/catfish/master/GIT/catfish/catfish/CatfishSearchEngine.py", line 173, in run
    if not path.endswith('/'):
AttributeError: 'NoneType' object has no attribute 'endswith'