glutanimate / highlight-search-results

Highlight Search Results in the Browser add-on for Anki
https://ankiweb.net/shared/info/225180905
Other
13 stars 5 forks source link

[Highlight Search Results in the Browser] google.protobuf.pyext._message.RepeatedScalarConta' object has no attribute 'index' #1

Closed ijgnd closed 4 years ago

ijgnd commented 4 years ago

Prerequisite checklist

What is the problem/feature you would like to see fixed/implemented?

shift+return triggers this error for me:

Anki 2.1.25 (898801eb) Python 3.8.1 Qt 5.14.1 PyQt 5.14.1
Platform: Linux
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2020-05-03 20:21:46
Add-ons possibly involved: ⁨Highlight Search Results in the Browser⁩

Caught exception:
Traceback (most recent call last):
File "../Anki2/addons21/225180905/browser_search_highlight_results.py", line 121, in <lambda>
    s.activated.connect(lambda: self.onCustomSearch(True))
File "../Anki2/addons21/225180905/browser_search_highlight_results.py", line 95, in onCustomSearch
    idx = cids.index(cur) + 1
AttributeError: 'google.protobuf.pyext._message.RepeatedScalarConta' object has no attribute 'index'

Version information

My debug info:

Anki 2.1.25 (898801eb) Python 3.8.1 Qt 5.14.1 PyQt 5.14.1
Platform: Linux
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2020-05-03 20:21:46

===Add-ons (active)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
Highlight Search Results in the Browser ['225180905', 2018-02-17T01:40, 'None', '']

===IDs of active AnkiWeb add-ons===
225180905

===Add-ons (inactive)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
glutanimate commented 4 years ago

Thanks for the report! This should be fixed with c7573a9faf2aac997d06cb0e497ef59fcae279c1. This, and fixes for everything else broken by 2.1.24+ will land in the next release.

glutanimate commented 4 years ago

(Of course: If you have the time, I'd appreciate it if you could give master a try and let me know if it works for you. Four eyes are always better than two!)