batterseapower / pinyin-toolkit

A plugin for the Anki Spaced Repetition System (http://ichi2.net/anki/)
http://batterseapower.github.com/pinyin-toolkit/
39 stars 14 forks source link

Blank Meaning Fields #179

Closed riveraangelic closed 13 years ago

riveraangelic commented 13 years ago

The pinyin toolkit no longer gives me automatic definitions for characters in the "meaning" field.

Traceback (most recent call last): File "C:\Users\Angelic\AppData\Roaming.anki\plugins\pinyin\anki\hooks.py", line 156, in self.mw.connect(self.action, QtCore.SIGNAL('triggered()'), lambda: self.triggered()) File "C:\Users\Angelic\AppData\Roaming.anki\plugins\pinyin\anki\hooks.py", line 137, in triggered controller = pinyin.forms.preferencescontroller.PreferencesController(preferences, self.notifier, self.mediamanager, self.config) File "C:\Users\Angelic\AppData\Roaming.anki\plugins\pinyin\forms\preferencescontroller.py", line 53, in init self.updateViewPreview() File "C:\Users\Angelic\AppData\Roaming.anki\plugins\pinyin\forms\preferencescontroller.py", line 228, in updateViewPreview self.updaterfromexpr.updatefact(fact, previewexpressions[self.model.prefersimptrad]) File "C:\Users\Angelic\AppData\Roaming.anki\plugins\pinyin\updater.py", line 297, in updatefact ] + (self.config.shouldusegoogletranslate and [ File "C:\Users\Angelic\AppData\Roaming.anki\plugins\pinyin\config.py", line 364, in getshouldusegoogletranslate self.__googletranslateworking = dictionaryonline.gCheck(self.dictlanguage) File "C:\Users\Angelic\AppData\Roaming.anki\plugins\pinyin\dictionaryonline.py", line 50, in gCheck lookup(u"好", destlanguage) File "C:\Users\Angelic\AppData\Roaming.anki\plugins\pinyin\dictionaryonline.py", line 100, in lookup return [[Word(Text(result[0]))]] + [[Word(Text(definition[0].capitalize() + ": " + ", ".join(definition[1:])))] for definition in result[1]] TypeError: sequence item 0: expected string, list found

batterseapower commented 13 years ago

This Pinyin Toolkit problem was caused by a change that Google made to the Google Translate response format. Please install v0.6.4 from the "Shared Plugins" menu to fix the bug.