Errors when LIFX device name has apostrophe

Posted on
Mon Jul 27, 2020 3:02 am
edrabbit offline
User avatar
Posts: 39
Joined: Apr 09, 2014

Errors when LIFX device name has apostrophe

Here are the errors I was seeing in my Indigo logs from the plugin when loading the LIFX plugin:
Code: Select all
 LIFX Error                      StandardError detected communicating with LIFX lamp. Line '165' has error=''ascii' codec can't decode byte 0xe2 in position 2: ordinal not in range(128)'


After throwing that error, all the lights showed up in red with No ack in Indigo because it bailed on communicating with the rest.

This is more of an iOS/LIFX issue, but caused an issue for me when interacting with the plugin in Indigo. This happens when I had an apostrophe in my LIFX device name (ex. Ed's Light). At least I thought it was an apostrophe. Turns out when I set the device name through the LIFX iOS app, the apostrophe on the iOS keyboard is actually the unicode right quote (u\2019) and LIFX stores it as such. If you want to use a real ascii apostrophe, long press on the right quote and select the actual apostrophe from the popup. Or you can just remove the quote mark from the name altogether.

Looks like other unicode characters will also cause this error.

Hopefully this saves someone from some head scratching and python debugging.

Posted on
Wed Jul 29, 2020 6:11 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Errors when LIFX device name has apostrophe

edrabbit wrote:
... Hopefully this saves someone from some head scratching and python debugging.


Many thanks for the heads-up. I will look at handling this in a future version. :)

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest