Describe the bug
Phonological search crashes when the user selects all segments and runs negative search.
Sample corpus file
'example' corpus
To Reproduce
Go to 'Phonological Search'
Select all segments from the inventory
Select 'negative'
Run search
See error
Expected behavior
A result table with one row of N/A
Additional context
Traceback (most recent call last):
File "D:\PycharmProjects\CorpusTools\corpustools\gui\main.py", line 320, in do_check
function(self)
File "D:\PycharmProjects\CorpusTools\corpustools\gui\main.py", line 335, in do_check
function(self)
File "D:\PycharmProjects\CorpusTools\corpustools\gui\main.py", line 965, in phonoSearch
'Phonological search results', dialog, self)
File "D:\PycharmProjects\CorpusTools\corpustools\gui\views.py", line 863, in init
dataModel.setSummarized(True)
File "D:\PycharmProjects\CorpusTools\corpustools\gui\models.py", line 633, in setSummarized
self._summarize()
File "D:\PycharmProjects\CorpusTools\corpustools\gui\models.py", line 589, in _summarize
tokenfreq[segenvfilters] += line['Word'].frequency # and add token freq accordingly
TypeError: unsupported operand type(s) for +=: 'float' and 'str'
Describe the bug Phonological search crashes when the user selects all segments and runs negative search.
Sample corpus file 'example' corpus
To Reproduce
Expected behavior A result table with one row of N/A
Additional context Traceback (most recent call last): File "D:\PycharmProjects\CorpusTools\corpustools\gui\main.py", line 320, in do_check function(self) File "D:\PycharmProjects\CorpusTools\corpustools\gui\main.py", line 335, in do_check function(self) File "D:\PycharmProjects\CorpusTools\corpustools\gui\main.py", line 965, in phonoSearch 'Phonological search results', dialog, self) File "D:\PycharmProjects\CorpusTools\corpustools\gui\views.py", line 863, in init dataModel.setSummarized(True) File "D:\PycharmProjects\CorpusTools\corpustools\gui\models.py", line 633, in setSummarized self._summarize() File "D:\PycharmProjects\CorpusTools\corpustools\gui\models.py", line 589, in _summarize tokenfreq[segenvfilters] += line['Word'].frequency # and add token freq accordingly TypeError: unsupported operand type(s) for +=: 'float' and 'str'
Process finished with exit code 1