iTunes Local Control and Catalina

Posted on
Sun Jun 06, 2021 10:01 am
kmarkley offline
Posts: 185
Joined: Nov 15, 2016

Re: iTunes Local Control and Catalina

That's very weird. The plugin compiles all the applescript objects on startup. In your case it looks like it's successfully compiling the first 9 objects and choking on the 10th.

My only suggestion at this point is to delete the plugin entirely and reinstall a fresh copy. If that doesn't work, we may need Matt or Jay to help dig into why the applescript compiler inside IndigoPluginHost is failing.

Posted on
Sun Jun 06, 2021 11:42 am
yassi offline
Posts: 468
Joined: Sep 06, 2015
Location: Germany

Re: iTunes Local Control and Catalina

kmarkley wrote:
That's very weird. The plugin compiles all the applescript objects on startup. In your case it looks like it's successfully compiling the first 9 objects and choking on the 10th.

My only suggestion at this point is to delete the plugin entirely and reinstall a fresh copy. If that doesn't work, we may need Matt or Jay to help dig into why the applescript compiler inside IndigoPluginHost is failing.


Ok, I've tried this (plugin disabled/deleted and installed a new copy) and still doesn't work.

Code: Select all
 Jun 2021 at 19:40:23
   Installing and enabling plugin iTunes Local Control v0.0.8
   Loading plugin "iTunes Local Control 0.0.8"
   Starting plugin "iTunes Local Control 0.0.8" (pid 60191)
   iTunes Local Control Error      Error in plugin execution InitializeMain:

Traceback (most recent call last):
  File "plugin.py", line 12, in <module>
  File "/Library/Application Support/Perceptive Automation/Indigo 7.5/Plugins/iTunes Local Control.indigoPlugin/Contents/Server Plugin/iTunesAppleScript.py", line 96, in <module>
  File "/Library/Application Support/Perceptive Automation/Indigo 7.5/Plugins/iTunes Local Control.indigoPlugin/Contents/Server Plugin/iTunesAppleScript.py", line 23, in _make
  File "/Library/Application Support/Perceptive Automation/Indigo 7.5/IndigoPluginHost.app/Contents/Resources/PlugIns/applescript/__init__.py", line 49, in __init__
ScriptError: Expected end of line, etc. but found identifier. (-2741) range=78-83

   Stopping plugin "iTunes Local Control 0.0.8" (pid 60191)
   Stopped plugin "iTunes Local Control 0.0.8"


Posted on
Sun Jun 06, 2021 4:24 pm
jay (support) offline
Site Admin
User avatar
Posts: 18185
Joined: Mar 19, 2008
Location: Austin, Texas

Re: iTunes Local Control and Catalina

We're using a library, so I don't know for sure what's going on. I wonder if there's something odd in the names of stuff that might be causing an error? I don't recall how the plugin works but if it's just failing on one instance then I'd suspect that something is odd about that instance.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sun Jun 06, 2021 4:42 pm
kmarkley offline
Posts: 185
Joined: Nov 15, 2016

Re: iTunes Local Control and Catalina

It's working for other users, so it must be something peculiar to this one system, I should think.

Based on the line numbers, the source sent to applescript.AppleScript() should be:
Code: Select all
on run(args)
    tell application "iTunes" -- or "Music" depending on OS version
        next track
    end tell
end run

I can add some debug logging for yassi to confirm that it's successfully compiling the previous applescript objects and failing on the one above. But beyond that, I haven't a clue.

It'll be a day or two to get it posted.

Posted on
Sun Jun 06, 2021 4:48 pm
rmo offline
Posts: 4
Joined: Feb 20, 2017

Re: iTunes Local Control and Catalina

FWIW, I am seeing the same error message:

Code: Select all
Jun 6, 2021 at 3:43:42 PM
   Indigo Cocoa client authenticated (192.168.0.4)
   Reloading plugin "iTunes Local Control 0.0.8"
   Starting plugin "iTunes Local Control 0.0.8" (pid 6018)
   iTunes Local Control Error      Error in plugin execution InitializeMain:

Traceback (most recent call last):
  File "plugin.py", line 12, in <module>
  File "/Library/Application Support/Perceptive Automation/Indigo 7.5/Plugins/iTunes Local Control.indigoPlugin/Contents/Server Plugin/iTunesAppleScript.py", line 96, in <module>
  File "/Library/Application Support/Perceptive Automation/Indigo 7.5/Plugins/iTunes Local Control.indigoPlugin/Contents/Server Plugin/iTunesAppleScript.py", line 23, in _make
  File "/Library/Application Support/Perceptive Automation/Indigo 7.5/IndigoPluginHost.app/Contents/Resources/PlugIns/applescript/__init__.py", line 49, in __init__
ScriptError: Expected end of line, etc. but found identifier. (-2741) range=78-83

   Stopping plugin "iTunes Local Control 0.0.8" (pid 6018)
   Stopped plugin "iTunes Local Control 0.0.8"


Posted on
Sun Jun 06, 2021 5:06 pm
rmo offline
Posts: 4
Joined: Feb 20, 2017

Re: iTunes Local Control and Catalina

I believe the problem is this version check:

Code: Select all
mac_base_ver = int(os.popen("sw_vers -productVersion").read().strip().split(".")[0])
if mac_base_ver > 10:
    AS_TARGET_NAME = "Music"
else:
    AS_TARGET_NAME = "iTunes"


I am on Catalina 10.15.7 using the Music.app. The plugin loads fine if I hard code AS_TARGET_NAME to "Music". I suspect the check works fine in Big Sur as well.

Posted on
Sun Jun 06, 2021 5:13 pm
kmarkley offline
Posts: 185
Joined: Nov 15, 2016

Re: iTunes Local Control and Catalina

So the version check should be this instead?:
Code: Select all
mac_base_ver = int(os.popen("sw_vers -productVersion").read().strip().split(".")[0])
if mac_base_ver >= 10:
    AS_TARGET_NAME = "Music"
else:
    AS_TARGET_NAME = "iTunes"

I have a High Sierra machine and a Big Sur machine and had check the internet for which OS version switched to Music.app. Not surprised if I got it wrong by one.

Could you test this change and confirm? Thanks.

Posted on
Mon Jun 14, 2021 12:56 pm
yassi offline
Posts: 468
Joined: Sep 06, 2015
Location: Germany

Re: iTunes Local Control and Catalina

Where do I have to change this? Which file?

Who is online

Users browsing this forum: No registered users and 1 guest