Plugin Fails with new version 2023.1.0

Posted on
Sun Dec 17, 2023 6:48 pm
farberm offline
Posts: 393
Joined: Feb 24, 2008

Plugin Fails with new version 2023.1.0

Here is the error I am getting with the new plugin.

Code: Select all
Dec 17, 2023 at 7:43:58 PM
   Reloading plugin "Sonos 2023.1.0" using API v3.1
   Starting plugin "Sonos 2023.1.0" (pid 1121)
   Sonos                           Plugin logging now started.
   Sonos                           Distribution: Package=lxml, Version=4.9.2
   Embedded script executor host1 started
   Sonos Error                     Error in plugin execution InitializeMain:

  File "<string>", line 1, in <module>
  File "plugin.py", line 149, in __init__
  File "/Library/Application Support/Perceptive Automation/Indigo 2023.1/Plugins/Sonos.indigoPlugin/Contents/Server Plugin/Sonos.py", line 79, in <module>
  File "/Library/Application Support/Perceptive Automation/Indigo 2023.1/Plugins/Sonos.indigoPlugin/Contents/Server Plugin/soco/__init__.py", line 12, in <module>
  File "/Library/Application Support/Perceptive Automation/Indigo 2023.1/Plugins/Sonos.indigoPlugin/Contents/Server Plugin/soco/core.py", line 58, in <module>
  File "/Library/Application Support/Perceptive Automation/Indigo 2023.1/Plugins/Sonos.indigoPlugin/Contents/Server Plugin/soco/zonegroupstate.py", line 67, in <module>
type: cannot import name 'etree' from 'lxml' (unknown location)

   Stopping plugin "Sonos 2023.1.0" (pid 1121)
   Stopped plugin "Sonos 2023.1.0"

Posted on
Mon Dec 18, 2023 8:50 am
autolog offline
Posts: 3991
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Plugin Fails with new version 2023.1.0

Not sure what is happening with that error?

What version of MacOS and Indigo are you running?

Can you try, running this in terminal (change Indigo version if different) and then reload the plugin:
Code: Select all
pip3.10 install lxml==4.9.2 --target "/Library/Application Support/Perceptive Automation/Indigo 2023.1/Preferences/Plugins/com.ssi.indigoplugin.Sonos.python_packages"

Posted on
Mon Dec 18, 2023 10:24 am
farberm offline
Posts: 393
Joined: Feb 24, 2008

Re: Plugin Fails with new version 2023.1.0

I am running Indigo 2023.1 and Sonoma 14.1.2

I ran the command and got the following.... which I assume means it was already installed). Still get the same error and the plug-in stops as before

Code: Select all
Collecting lxml==4.9.2
  Using cached lxml-4.9.2-cp310-cp310-macosx_10_15_x86_64.whl (4.7 MB)
Installing collected packages: lxml
Successfully installed lxml-4.9.2
WARNING: Target directory /Library/Application Support/Perceptive Automation/Indigo 2023.1/Preferences/Plugins/com.ssi.indigoplugin.Sonos.python_packages/lxml-4.9.2.dist-info already exists. Specify --upgrade to force replacement.

Posted on
Mon Dec 18, 2023 10:48 am
autolog offline
Posts: 3991
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Plugin Fails with new version 2023.1.0

What version of the plugin where you previously running?

Posted on
Mon Dec 18, 2023 6:59 pm
farberm offline
Posts: 393
Joined: Feb 24, 2008

Re: Plugin Fails with new version 2023.1.0

.27

Posted on
Mon Dec 18, 2023 7:16 pm
farberm offline
Posts: 393
Joined: Feb 24, 2008

Re: Plugin Fails with new version 2023.1.0

I deleted all my devices, deleted the plugin and all the associated files and reinstalled everything.....

I still get the following error.....
Code: Select all
 Reloading plugin "Sonos 2023.1.0" using API v3.1
   Starting plugin "Sonos 2023.1.0" (pid 1602)
   Sonos                           Plugin logging now started.
   Sonos                           Distribution: Package=lxml, Version=4.9.2
   Sonos Error                     Error in plugin execution InitializeMain:

  File "<string>", line 1, in <module>
  File "plugin.py", line 149, in __init__
  File "/Library/Application Support/Perceptive Automation/Indigo 2023.1/Plugins/Sonos.indigoPlugin/Contents/Server Plugin/Sonos.py", line 79, in <module>
  File "/Library/Application Support/Perceptive Automation/Indigo 2023.1/Plugins/Sonos.indigoPlugin/Contents/Server Plugin/soco/__init__.py", line 12, in <module>
  File "/Library/Application Support/Perceptive Automation/Indigo 2023.1/Plugins/Sonos.indigoPlugin/Contents/Server Plugin/soco/core.py", line 58, in <module>
  File "/Library/Application Support/Perceptive Automation/Indigo 2023.1/Plugins/Sonos.indigoPlugin/Contents/Server Plugin/soco/zonegroupstate.py", line 67, in <module>
type: cannot import name 'etree' from 'lxml' (unknown location)

   Stopping plugin "Sonos 2023.1.0" (pid 1602)
   Stopped plugin "Sonos 2023.1.0"

Posted on
Tue Dec 19, 2023 9:59 am
autolog offline
Posts: 3991
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Plugin Fails with new version 2023.1.0

Can you try reinstalling .27 and see if that still works?

It could be something related to the upgrade to the SoCo package, not that I have had any problems getting it to work.

Posted on
Tue Dec 19, 2023 10:12 am
farberm offline
Posts: 393
Joined: Feb 24, 2008

Re: Plugin Fails with new version 2023.1.0

Ok tried reinstalling. It asked me to install Twisted, so I did... but I still got the following error even with 0.27
Now, I am not sure what is going on???

Code: Select all
 Sonos                           Plugin logging now started.
   Sonos Error                     Error in plugin execution InitializeMain:

  File "<string>", line 1, in <module>
  File "plugin.py", line 149, in __init__
  File "/Library/Application Support/Perceptive Automation/Indigo 2023.1/Plugins/Sonos.indigoPlugin/Contents/Server Plugin/Sonos.py", line 79, in <module>
  File "/Library/Application Support/Perceptive Automation/Indigo 2023.1/Plugins/Sonos.indigoPlugin/Contents/Server Plugin/soco/__init__.py", line 11, in <module>
  File "/Library/Application Support/Perceptive Automation/Indigo 2023.1/Plugins/Sonos.indigoPlugin/Contents/Server Plugin/soco/core.py", line 57, in <module>
  File "/Library/Application Support/Perceptive Automation/Indigo 2023.1/Plugins/Sonos.indigoPlugin/Contents/Server Plugin/soco/zonegroupstate.py", line 67, in <module>
type: cannot import name 'etree' from 'lxml' (unknown location)

   Stopping plugin "Sonos 2023.0.27" (pid 93287)
   Stopped plugin "Sonos 2023.0.27"

Posted on
Tue Dec 19, 2023 10:48 am
autolog offline
Posts: 3991
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Plugin Fails with new version 2023.1.0

Try this, re-install the latest version of the plugin from the Indigo Plugin Store.

It should fail.

Then run the following install in the a terminal window:
Code: Select all
pip3 install lxml
Then restart the plugin

Posted on
Tue Dec 19, 2023 12:26 pm
farberm offline
Posts: 393
Joined: Feb 24, 2008

Re: Plugin Fails with new version 2023.1.0

OK id that now the plugin just stops....no error messages...Confusing?

Code: Select all
   Sonos                           Plugin __init__ ended.
   Started plugin "Sonos 2023.1.0"
   Sonos                           Plugin startup started.
   Sonos                           Plugin being stopped.
   Stopping plugin "Sonos 2023.1.0" (pid 7430)
   Sonos                           Plugin stop request completed.
   Sonos                           Plugin startup ended.

Posted on
Tue Dec 19, 2023 12:40 pm
farberm offline
Posts: 393
Joined: Feb 24, 2008

Re: Plugin Fails with new version 2023.1.0

Success... Had to also reinstall Twisted 23.8.0

Posted on
Tue Dec 19, 2023 1:05 pm
autolog offline
Posts: 3991
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Plugin Fails with new version 2023.1.0

That's a relief - well done! :)

Just to double check, you are up and running on 2023.1.0?

Posted on
Tue Dec 19, 2023 2:12 pm
farberm offline
Posts: 393
Joined: Feb 24, 2008

Re: Plugin Fails with new version 2023.1.0

yes

Posted on
Tue Jan 02, 2024 9:55 am
wideglidejrp offline
User avatar
Posts: 555
Joined: Jan 15, 2012
Location: Danbury, CT

Re: Plugin Fails with new version 2023.1.0

Good day, and happy new year. I am having trouble with Sonos plugin. I had everything except Sirius/XM working but now new problems. I am running Indigo 2023.1.1. Here is what I am getting.....

Sonos Error 'local variable 'l2p' referenced before assignment' in module 'Sonos.py', method 'actionAnnouncement [2023.0.26]'
Failing statement [line 2736]: 'self.SOAPSend(zoneIP, "/MediaRenderer", "/AVTransport", "AddURIToQueue", "<EnqueuedURI>"+l2p+"</EnqueuedURI><EnqueuedURIMetaData></EnqueuedURIMetaData><DesiredFirstTrackNumberEnqueued>0</DesiredFirstTrackNumberEnqueued><EnqueueAsNext>1</EnqueueAsNext>")'


Any suggestions?

John R Patrick
Author of
Home Attitude

Posted on
Tue Jan 02, 2024 10:45 am
autolog offline
Posts: 3991
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Plugin Fails with new version 2023.1.0

wideglidejrp wrote:
Good day, and happy new year. I am having trouble with Sonos plugin. I had everything except Sirius/XM working but now new problems. I am running Indigo 2023.1.1. Here is what I am getting.....

Sonos Error 'local variable 'l2p' referenced before assignment' in module 'Sonos.py', method 'actionAnnouncement [2023.0.26]'
Failing statement [line 2736]: 'self.SOAPSend(zoneIP, "/MediaRenderer", "/AVTransport", "AddURIToQueue", "<EnqueuedURI>"+l2p+"</EnqueuedURI><EnqueuedURIMetaData></EnqueuedURIMetaData><DesiredFirstTrackNumberEnqueued>0</DesiredFirstTrackNumberEnqueued><EnqueueAsNext>1</EnqueueAsNext>")'


Any suggestions?

Happy new year to you to. :)

This looks like a bug in the plugin. It is occurring in an area of code that hasn't been changed logic wise since the Python 2 version. I will have to try and work out what it is doing in order to resolve this.

Were you playing anything when you played the announcement because it seems like it was trying to recover what was playing and failed?

Who is online

Users browsing this forum: No registered users and 11 guests