Closed Nick3C closed 15 years ago
Done in my branch.
Seems to still be some problems here. Try: 偏题
File "C:\Documents and Settings\Nick\Application Data.anki\plugins\pinyin\anki\hooks.py", line 37, in pinyin.utils.suppressexceptions(lambda: self.updater.updatefact(factproxy, field.value)) File "C:\Documents and Settings\Nick\Application Data.anki\plugins\pinyin\updater.py", line 170, in updatefact meaning = self.generatemeanings(expression, dictmeanings) File "C:\Documents and Settings\Nick\Application Data.anki\plugins\pinyin\updater.py", line 92, in generatemeanings dictmeanings = [transformations.maskhanzi(expression, self.config.hanzimaskingcharacter, dictmeaning) for dictmeaning in dictmeanings] File "C:\Documents and Settings\Nick\Application Data.anki\plugins\pinyin\transformations.py", line 157, in maskhanzi return token.accept(MaskHanziVisitor(expression, maskingcharacter)) AttributeError: 'unicode' object has no attribute 'accept'
Hmm, I can't reproduce that error, but I may have inadvertently fixed it in my most recent refactoring (that code doesn't exist any longer).
ah, neat :)
google sometimes returns only the query (if it is feeling particularly useless or the words has been censored [such as swearing]). Need to add a check to see if text is the same otherwise just the masking character and the google translate notice are returned (which is ugly).