oliver / gedit-file-search

Gedit plugin to search a text in all files in a directory
https://oliver.github.io/gedit-file-search/
43 stars 11 forks source link

AttributeError: 'Document' object has no attribute 'get_location' #21

Open bitsnaps opened 2 years ago

bitsnaps commented 2 years ago

Hi, I got this error when clicking on Search files...:

Traceback (most recent call last):
  File ".../.local/share/gedit/plugins/gedit-file-search/file-search/plugin.py", line 141, in on_search_files_activate
    self._openSearchDialog()
  File ".../.local/share/gedit/plugins/gedit-file-search/file-search/plugin.py", line 146, in _openSearchDialog
    self._searchDialog.show(searchText, searchDirectory)
  File ".../.local/share/gedit/plugins/gedit-file-search/file-search/search_dialog.py", line 194, in show
    gFilePath = self._window.get_active_tab().get_document().get_location()
AttributeError: 'Document' object has no attribute 'get_location'

Note: I had to create this directory /.local/share/gedit/plugins/ and grant permissions to the current user. ubuntu 20.04.

SchrodingersCpp commented 3 months ago

Here is the solution that worked for me.