iTunes Local Control and Catalina

kmarkley
Posts: 187
Joined: Tue Nov 15, 2016 8:04 pm

Re: iTunes Local Control and Catalina

Post by kmarkley »

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.
yassi
Posts: 498
Joined: Sun Sep 06, 2015 7:14 am
Location: Germany

Re: iTunes Local Control and Catalina

Post by yassi »

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"

User avatar
jay (support)
Site Admin
Posts: 19232
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: iTunes Local Control and Catalina

Post by jay (support) »

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
kmarkley
Posts: 187
Joined: Tue Nov 15, 2016 8:04 pm

Re: iTunes Local Control and Catalina

Post by kmarkley »

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.
rmo
Posts: 5
Joined: Mon Feb 20, 2017 9:42 pm

Re: iTunes Local Control and Catalina

Post by rmo »

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"

rmo
Posts: 5
Joined: Mon Feb 20, 2017 9:42 pm

Re: iTunes Local Control and Catalina

Post by rmo »

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.
kmarkley
Posts: 187
Joined: Tue Nov 15, 2016 8:04 pm

Re: iTunes Local Control and Catalina

Post by kmarkley »

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.
yassi
Posts: 498
Joined: Sun Sep 06, 2015 7:14 am
Location: Germany

Re: iTunes Local Control and Catalina

Post by yassi »

Where do I have to change this? Which file?
Post Reply

Return to “kmarkley's plugins”