[SOLVED] Decoding str is not supported

All,

I’m writing my first skill. It works but I have an exception that I can’t understand:

===================
mycroft.skills.core:wrapper:607 - ERROR - An error occurred while processing a request in Alfred Skill

Traceback (most recent call last):
File “skills/core.py”, line 598, in wrapper
handler(message)

File “init.py”, line 107, in handle_all_orange_intent
def handle_all_green_intent(self, message):

TypeError: decoding str is not supported

b"Aucun sc\xc3\xa9nario correspondant \xc3\xa0 l’ID : "

The faulty line of code reads:

===================
def handle_all_green_intent(self, message):
self.call_jeedom(self.idgreen, self.actiongreen) <— here

def call_jeedom(self, action_id, action):
    urllib.request.urlopen("{}/core/api/jeeApi.php?apikey={}&type=scenario&id={}&action={}".format(
            self.jeedomaddress, self.apikey, action_id, action))

===================

I drive my Philips Hue lighting via Jeedom: the light bulbs respond and then I have the error. Any idea about what I can do to suppress this exception, please?

Hmm, I forgot to mention that Mycroft runs on Debian Linux stable, for me.

Thanks for posting this @BugHunterPhilosopher.

My initial step in all these sorts of cases is to see what data is being returned by the API.

Can you please post the JSON that is being returned by Jeedom?

Kind regards,
Kathy

Hi Kathy,

Thanks for helping. After trying to convert Mycroft to French language with no success, I reinstalled all. And then, it all works! Maybe it is because yesterday I was using Mycroft master where today I use Mycroft dev, but anyway: no more exception.

So I can confirm that my first skill is a success!

1 Like

Great! Merci beaucoup!
Thanks for letting us know.