File “/opt/mycroft/skills/TranslateSkill/init.py”, line 73, in say
sentence = unicodedata.normalize(‘NFKD’,sentence).encode(‘ascii’,‘ignore’)
TypeError: must be unicode, not str
The follow change is tested and working
Before …
# sentence = unicode(sentence, “utf-8”)
sentence = unicodedata.normalize(‘NFKD’,sentence).encode(‘ascii’,‘ignore’)
After
s = unicode(sentence, “utf-8”)
sentence = unicodedata.normalize(‘NFKD’,s).encode(‘ascii’,‘ignore’)
Hey mycroft, translate good day to french <-- Works
Hey mycroft, translate what time is it to french <-- Only speaks one word est-ce
Hey mycroft translate voulez vous couche avec moi to english <-- This works
Single words kinda work but sentences not so well.
Thanks @Mohamed_Benaissa for providing the log information, it is very helpful.
It shows that there is an error in the Skill, in the function handle_translate. The line that does word = message.metadata.get("TranslateKeyword")
assumes that the message.metadata object is not null, but in this case it appears to be null. I would recommend using the LOGGER function to log the contents of the message.metadata object to the mycroft-skills.log file so that we can see why the object is not populated.
This is why the Skill is not responding - the code for the Intent is failing.