A bit early to mark this bug as invalid methinks. A space character in a
file name also causes the search to fail! E.g.:-

DEBUG: Opening dialog "Search - Zim"
INFO: Searching for: test
WARNING: Ignoring file: "Info-Nine_Albums_of 
Psychedelic_Rock-Heavy_1968-72.txt" invalid file name
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/zim/gui/searchdialog.py", line 48, in 
search
    self.results_treeview.set_query( self.query_entry.get_text() )
  File "/usr/lib/pymodules/python2.6/zim/gui/searchdialog.py", line 90, in 
set_query
    result = self.searcher.search(self.query)
  File "/usr/lib/pymodules/python2.6/zim/search.py", line 205, in search
    return self._filter_and(query, query.root, RootSelection(self.notebook))
  File "/usr/lib/pymodules/python2.6/zim/search.py", line 214, in _filter_and
    selection = selection.filter(key, word, regex)
  File "/usr/lib/pymodules/python2.6/zim/search.py", line 144, in filter
    tree = page.get_parsetree()
  File "/usr/lib/pymodules/python2.6/zim/notebook.py", line 1380, in 
get_parsetree
    self._parsetree = self._fetch_parsetree()
  File "/usr/lib/pymodules/python2.6/zim/stores/files.py", line 183, in 
_fetch_parsetree
    lines = lines or self.source.readlines()
  File "/usr/lib/pymodules/python2.6/zim/fs.py", line 575, in readlines
    content = file.readlines()
  File "/usr/lib/python2.6/codecs.py", line 674, in readlines
    return self.reader.readlines(sizehint)
  File "/usr/lib/python2.6/codecs.py", line 583, in readlines
    data = self.read()
  File "/usr/lib/python2.6/codecs.py", line 472, in read
    newchars, decodedbytes = self.decode(data, self.errors)
UnicodeDecodeError: 'utf8' codec can't decode byte 0x96 in position 50: 
unexpected code byte
DEBUG: Closed dialog "Search"


Also, it would appear that a "bad" character *inside* a file also causes the 
search to fail as well! At least, I'm guessing that is the cause of this debug 
output because all my files use standard ascii chars - and no spaces:- 

DEBUG: Action: show_search
DEBUG: Opening dialog "Search - Zim"
INFO: Searching for: test
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/zim/gui/searchdialog.py", line 48, in 
search
    self.results_treeview.set_query( self.query_entry.get_text() )
  File "/usr/lib/pymodules/python2.6/zim/gui/searchdialog.py", line 90, in 
set_query
    result = self.searcher.search(self.query)
  File "/usr/lib/pymodules/python2.6/zim/search.py", line 205, in search
    return self._filter_and(query, query.root, RootSelection(self.notebook))
  File "/usr/lib/pymodules/python2.6/zim/search.py", line 214, in _filter_and
    selection = selection.filter(key, word, regex)
  File "/usr/lib/pymodules/python2.6/zim/search.py", line 144, in filter
    tree = page.get_parsetree()
  File "/usr/lib/pymodules/python2.6/zim/notebook.py", line 1380, in 
get_parsetree
    self._parsetree = self._fetch_parsetree()
  File "/usr/lib/pymodules/python2.6/zim/stores/files.py", line 183, in 
_fetch_parsetree
    lines = lines or self.source.readlines()
  File "/usr/lib/pymodules/python2.6/zim/fs.py", line 575, in readlines
    content = file.readlines()
  File "/usr/lib/python2.6/codecs.py", line 674, in readlines
    return self.reader.readlines(sizehint)
  File "/usr/lib/python2.6/codecs.py", line 583, in readlines
    data = self.read()
  File "/usr/lib/python2.6/codecs.py", line 472, in read
    newchars, decodedbytes = self.decode(data, self.errors)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xb4 in position 1735: 
unexpected code byte
DEBUG: Closed dialog "Search"

Please don't dismiss this as invalid. Zim is a great tool. But without a
reliable search, sadly it becomes practically useless and one might as
well use Kate or something.

Many thanks. Best wishes, G.

-- 
search doesn't work after upgrade to lucid
https://bugs.launchpad.net/bugs/584198
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to