Lutron RRA2/Caséta will no load

Posted on
Sat May 06, 2023 7:03 am
madscientist offline
Posts: 121
Joined: Jan 05, 2007
Location: Ontario, Canada

Lutron RRA2/Caséta will no load

I've been using the RRA2/Caséta plugin for a long time without issue, but recently the plugin can't be enabled, and the following errors are appearing in the log:

Code: Select all
   Starting plugin "Lutron RRA2/Caséta 2022.1.2" (pid 85058)
   Lutron RRA2/Caséta Error        insert() argument 2 must be xml.etree.ElementTree.Element, not lxml.etree._Element
Traceback (most recent call last):
  File "/Library/Application Support/Perceptive Automation/Indigo 2022.2/IndigoPluginHost3.app/Contents/Resources/PlugIns/plugin_base.py", line 290, in __init__
    indigo._resolvePluginFuncFromName(self, "_parseDevicesXML")(DEVICE_FILENAME)
  File "/Library/Application Support/Perceptive Automation/Indigo 2022.2/IndigoPluginHost3.app/Contents/Resources/PlugIns/plugin_base.py", line 894, in _parse_devices_xml
    device_dict["ConfigUIRawXml"] = self._parse_config_ui_node(config_ui, filename=filename)
  File "/Library/Application Support/Perceptive Automation/Indigo 2022.2/IndigoPluginHost3.app/Contents/Resources/PlugIns/plugin_base.py", line 624, in _parse_config_ui_node
    self._swap_templated_field(config_ui, refnode, refid, templatename, True)
  File "/Library/Application Support/Perceptive Automation/Indigo 2022.2/IndigoPluginHost3.app/Contents/Resources/PlugIns/plugin_base.py", line 604, in _swap_templated_field
    config_ui.insert(insert_index, import_field)
TypeError: insert() argument 2 must be xml.etree.ElementTree.Element, not lxml.etree._Element
   Stopping plugin "Lutron RRA2/Caséta 2022.1.2" (pid 85058)
   Stopped plugin "Lutron RRA2/Caséta 2022.1.2"


I've tried disabling and re-enabling the plugin, but it still won't load. I've also tried deleting and re-installing the plugin. Any ideas what may have happened?

Posted on
Sat May 06, 2023 7:16 am
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Lutron RRA2/Caséta will no load

Delete the plugin totally and reinstall from the plugin store. One of the XML files in the plugin got corrupted somehow.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sat May 06, 2023 10:54 am
madscientist offline
Posts: 121
Joined: Jan 05, 2007
Location: Ontario, Canada

Re: Lutron RRA2/Caséta will no load

No luck. I stopped the Indigo server, deleted the plug from the folder /Library/Application Support/Perceptive Automation/Indigo 2022.2/Plugins, downloaded the latest release and installed it, and then restarted Indigo. The same error message is there.

Posted on
Sat May 06, 2023 11:03 am
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Lutron RRA2/Caséta will no load

Looking at this line in the error:

Code: Select all
TypeError: insert() argument 2 must be xml.etree.ElementTree.Element, not lxml.etree._Element


Makes me think that you installed the lxml Python package and it's interfering with the base xml package.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sat May 06, 2023 12:06 pm
madscientist offline
Posts: 121
Joined: Jan 05, 2007
Location: Ontario, Canada

Re: Lutron RRA2/Caséta will no load

Now that you mention it, I recently installed bazaar (https://www.bazarr.media/) from the Terminal. I notice that the installation script installed a variety of packages, including lxml. I don't how to delete it though. I tried
Code: Select all
sudo pip uninstall lxml
. It did something...but I don't think it fully uninstalled it as I'm still getting that same error message.

Posted on
Sat May 06, 2023 12:07 pm
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Lutron RRA2/Caséta will no load

Try

Code: Select all
sudo pip3 uninstall lxml

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sat May 06, 2023 12:21 pm
madscientist offline
Posts: 121
Joined: Jan 05, 2007
Location: Ontario, Canada

Re: Lutron RRA2/Caséta will no load

I tried that and it seemed to uninstall the lxml package, but I got this error message:

WARNING: The directory '/Users/[user]/Library/Caches/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
WARNING: Skipping lxml as it is not installed.
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv


When I tried running it again using sudo's -H flag, an error message came up indicating that lxml was no longer installed.

But despite doing this I am still getting the same Lutron plugin error. I tried reinstalling it again just in case there were residual problems with the xml files, but that did not make a differnce.

Posted on
Sat May 06, 2023 12:24 pm
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Lutron RRA2/Caséta will no load

There's some remnant of that still installed, or maybe symlinks. Look in all the Python site-packages folders for anything like that. Maybe do a system wide search for lxml.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sat May 06, 2023 12:25 pm
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Lutron RRA2/Caséta will no load

It's also possible that reinstalling Indigo 2022.2 (which will re-install Python3) will fix it.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sat May 06, 2023 12:27 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Lutron RRA2/Caséta will no load

Great suggestion. First delete this framework folder:

/Library/Frameworks/Python.framework/

then re-run the Indigo installer and you should have a clean Indigo compatible Python install.

Image

Posted on
Sat May 06, 2023 12:45 pm
madscientist offline
Posts: 121
Joined: Jan 05, 2007
Location: Ontario, Canada

Re: Lutron RRA2/Caséta will no load

Thanks for the additional suggestions, but still no luck. Here's what I did:

- stopped the Indigo server
- removed the Python framework folder with the command
sudo rm -Rf /Library/Frameworks/Python.framework/

- re-installed Indigo 2022.2
- deleted the Lutron Caseta plug-in (in case the XMLs were corrupt)
- started Indigo
- re-installed the Lutron Caseta plug-in

I'm still getting the xml.etree.ElementTree.Element error message.

Posted on
Sat May 06, 2023 1:04 pm
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Lutron RRA2/Caséta will no load

Hmm. That is really weird. It's failing before it even gets to the actual plugin code, so I'm helpless to track this down.

As an aside, are you using this for RadioRa or Caseta gear? If Caseta, try the Lutron Leap plugin https://www.indigodomo.com/pluginstore/278/ as an alternative.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sat May 06, 2023 1:06 pm
madscientist offline
Posts: 121
Joined: Jan 05, 2007
Location: Ontario, Canada

Re: Lutron RRA2/Caséta will no load

Caseta...I will try the Leap plugin.

Posted on
Sat May 06, 2023 1:21 pm
madscientist offline
Posts: 121
Joined: Jan 05, 2007
Location: Ontario, Canada

Re: Lutron RRA2/Caséta will no load

The Leap plugin is also not working, and I now notice that I am getting errors with two other plugins: Harmony Hub and MyQ.

The Leap plugin won't load and is producing this error:
Lutron Leap Error Error in plugin execution InitializeMain:
File "plugin.py", line 11, in <module>
type: No module named 'zeroconf'


Harmony Hub is saying this:
Harmony Hub Error Error in plugin execution InitializeMain:
File "plugin.py", line 16, in <module>
type: 'Required Python libraries missing. Run 'pip3 install aioharmony' in Terminal window, then reload plugin. Xcode required!


I tried running 'pip3 install aioharmony' in Terminal...no change.

MyQ is saying this:
MyQ Error Error in plugin execution InitializeMain:
File "plugin.py", line 18, in <module>
type: 'Required Python libraries missing. Run 'pip3 install pymyq==3.1.5' in Terminal window, then reload plugin.


I tried running 'pip3 install pymyq==3.1.5' in Terminal'. Also no change.

So the problems are more widespread that the Lutron plugins. I seem to have managed to completely mess up my whole system to the point that re-installing Indigo doesn't help.

Any suggestions for next steps? I do have a Time Machine backup from about a month ago. I've done considerable work to my Indigo database since that time, but I suppose I could backup the database and plugins folder, do a complete system restore from the month old Time Machine backup, then replace the Indigo database and plugins folder with the most recent version. Any other suggestions to try before resorting to a complete system restore?

Posted on
Sat May 06, 2023 1:24 pm
FlyingDiver offline
User avatar
Posts: 7222
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Lutron RRA2/Caséta will no load

Yeah, your entire Python install is hosed. At this point, I think saving the Indigo folder (so you get the database, plugins, and preferences files) and restoring from backup is probably best.

Matt may have a better idea.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Who is online

Users browsing this forum: No registered users and 7 guests