# AMIs stopped working on OSX Monterey

**URL:** <https://community.shotgridsoftware.com/t/amis-stopped-working-on-osx-monterey/16886>\
**Category:** Pipeline Integrations\
**Tags:** ami\
**Created:** [February 24, 2023, 7:03am UTC](https://community.shotgridsoftware.com/t/amis-stopped-working-on-osx-monterey/16886 "2023-02-24T07:03:47Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![frank](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/frank/32/247_2.png) [@frank](https://community.shotgridsoftware.com/u/frank)\
**Post date:** [February 24, 2023, 7:03am UTC](https://community.shotgridsoftware.com/t/amis-stopped-working-on-osx-monterey/16886/1 "2023-02-24T07:03:47Z")

</div>

Hi,

my AMIs worked just fine early last year when I last needed them on my OSX machine (been in windows and linux land ever since).  
But now they just don’t firfe the script that the protocol handler is poiting to (the app that was made from the simple Apple Script as per [these docs](https://developer.shotgridsoftware.com/af0c94ce/?title=Launching+Applications+Using+Custom+Browser+Protocols#registering-a-protocol-on-osx)).

When I try to run an AMI I can see for a split second that the applet is run, so the issue seems to be that it will not fire the assigned python script which lives on the server.  
The python script uses the boiler plate and should at the least output some log info, but I get nothing.

I gave the applet full disk access in the system preferences as well:

 ![image](https://global.discourse-cdn.com/shotgunsoftware/original/2X/d/dd09a1a15b149dbf5c60ad691df23a1076b56449.png)

The only thing that has changed is that I updated OSX to Monterey at some stage so I assume that might be related. There are a fair bunch of messages in the system console when I try to run the AMI but none of those mean anythign to me.

Does anybody have any ideas how to get this going again? AMIs are quite important to me.

Cheers,  
frank

---

<div class="post-metadata">

**Author:** ![mmoshev](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/mmoshev/32/476_2.png) [@mmoshev](https://community.shotgridsoftware.com/u/mmoshev)\
**Post date:** [February 24, 2023, 7:56am UTC](https://community.shotgridsoftware.com/t/amis-stopped-working-on-osx-monterey/16886/2 "2023-02-24T07:56:04Z")

</div>

You better post the error messages. Possibly Python got updated? (no experience on OSX)

---

<div class="post-metadata">

**Author:** ![frank](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/frank/32/247_2.png) [@frank](https://community.shotgridsoftware.com/u/frank)\
**Post date:** [February 25, 2023, 1:59am UTC](https://community.shotgridsoftware.com/t/amis-stopped-working-on-osx-monterey/16886/3 "2023-02-25T01:59:01Z")

</div>

This is the error message I see in Apple’s Console when I try to run the AMI:  
`RBSStateCapture remove item called for untracked item 268-143-1744608 (target:[app<application.com.ohufx.AppleScript.ShotGrid.73284227.73284235(1001)>:42252])`

Followed by a ton of messages (not tagged as errors).

Support told me to updated my plist (see below), but it’s still not working, though I now get this message when I try to run the AMI:  
 ![image](https://global.discourse-cdn.com/shotgunsoftware/original/2X/7/78ab782f2877558cd317632ba13efdb98ec7376a.png)

> Please follow the below for the Monterey update and let us know if have any issues.
> 
> The info. plist has changed. The following lines need to be deleted.
> 
> ```auto
> <string>This script needs to control other applications to run.</string>
> <key>NSAppleMusicUsageDescription</key>
> <string>This script needs access to your music to run.</string>
> <key>NSCalendarsUsageDescription</key>
> <string>This script needs access to your calendars to run.</string>
> <key>NSCameraUsageDescription</key>
> <string>This script needs access to your camera to run.</string>
> <key>NSContactsUsageDescription</key>
> <string>This script needs access to your contacts to run.</string>
> <key>NSHomeKitUsageDescription</key>
> <string>This script needs access to your HomeKit Home to run.</string>
> <key>NSMicrophoneUsageDescription</key>
> <string>This script needs access to your microphone to run.</string>
> <key>NSPhotoLibraryUsageDescription</key>
> <string>This script needs access to your photos to run.</string>
> <key>NSRemindersUsageDescription</key>
> <string>This script needs access to your reminders to run.</string>
> <key>NSSiriUsageDescription</key>
> <string>This script needs access to Siri to run.</string> 
> 
> ```
> 
> The above lines are between
> 
> “NSAppleEventsUsageDescription” and “NSSystemAdministrationUsageDescription”

I long for the day that Apple is no longer part of our machine setup…

---

<div class="post-metadata">

**Author:** ![kporangehat](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/kporangehat/32/313_2.png) [@kporangehat](https://community.shotgridsoftware.com/u/kporangehat)\
**Post date:** [February 26, 2023, 2:01am UTC](https://community.shotgridsoftware.com/t/amis-stopped-working-on-osx-monterey/16886/4 "2023-02-26T02:01:06Z")

</div>

Frank! Man… it’s been a long time… 🙂

Long shot, but have you tried double clicking that applet on it’s own? It’s (remotely) possible it will register something that will allow it to run and then be accessible via your AMIs afterward. I’m not using that setup but I have encountered similar situations.

Don’t be a MacOS hater… ha.

cheers,  
kp

---

<div class="post-metadata">

**Author:** ![frank](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/frank/32/247_2.png) [@frank](https://community.shotgridsoftware.com/u/frank)\
**Post date:** [February 26, 2023, 9:35pm UTC](https://community.shotgridsoftware.com/t/amis-stopped-working-on-osx-monterey/16886/5 "2023-02-26T21:35:22Z")

</div>

KP!! So good to see you are still hanging out here. I seriously miss you guys!  
Hope you are well!!

I found the issue. Looks like the OSX upgrade lost `/usr/bin/python` . When I change the shebank in my AMI script to `/usr/bin/python3` it actually runs as expected.  
Makes sense and I should have checked that before.

Looks like the [boiler plate](https://gist.github.com/kporangehat/3253287) never made it to python 3 though and I clearly forgot that my AMIs were still using Python2, so will look into patching that now.  
EDIT: looks like it just needed one mod:

> urllib.unquote \> urllib.parse.unquote

Woopwoop, got my AMIs back, hooray.

Cheers,  
frank

---

<div class="post-metadata">

**Author:** ![frank](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/frank/32/247_2.png) [@frank](https://community.shotgridsoftware.com/u/frank)\
**Post date:** [February 26, 2023, 10:23pm UTC](https://community.shotgridsoftware.com/t/amis-stopped-working-on-osx-monterey/16886/6 "2023-02-26T22:23:39Z")

</div>

> [@kporangehat](#):
>
> Don’t be a MacOS hater… ha.

I am trying but Apple is making it every hard not to with crap like this:

> **[macOS Monterey 12.3 will remove Python 2.7 (/usr/bin/python)](https://macmule.com/2022/01/29/macos-monterey-12-3-will-remove-python-2-7-usr-bin-python/)**
>
> Hot on the heels of macOS Monterey 12.2, Apple have publicly released the macOS Monterey 12.3 Beta Release Notes. Despite this being a point release, there are a few breaking changes. The kernels f…

---

<div class="post-metadata">

**Author:** ![mmoshev](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/mmoshev/32/476_2.png) [@mmoshev](https://community.shotgridsoftware.com/u/mmoshev)\
**Post date:** [February 27, 2023, 7:36am UTC](https://community.shotgridsoftware.com/t/amis-stopped-working-on-osx-monterey/16886/7 "2023-02-27T07:36:59Z")

</div>

mmyeah python 2.7 has been end of life for 12 years man, update your version now 🙂

---

<div class="post-metadata">

**Author:** ![frank](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/frank/32/247_2.png) [@frank](https://community.shotgridsoftware.com/u/frank)\
**Post date:** [February 27, 2023, 7:39am UTC](https://community.shotgridsoftware.com/t/amis-stopped-working-on-osx-monterey/16886/8 "2023-02-27T07:39:35Z")

</div>

And do you know when the vfx industry finally switched to python3?

---

<div class="post-metadata">

**Author:** ![mmoshev](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/mmoshev/32/476_2.png) [@mmoshev](https://community.shotgridsoftware.com/u/mmoshev)\
**Post date:** [February 27, 2023, 8:50am UTC](https://community.shotgridsoftware.com/t/amis-stopped-working-on-osx-monterey/16886/9 "2023-02-27T08:50:02Z")

</div>

I know some software lags behind ,but the reference platform for 2020 uses python 3.7.

---

<div class="post-metadata">

**Author:** ![kporangehat](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/kporangehat/32/313_2.png) [@kporangehat](https://community.shotgridsoftware.com/u/kporangehat)\
**Post date:** [February 27, 2023, 3:29pm UTC](https://community.shotgridsoftware.com/t/amis-stopped-working-on-osx-monterey/16886/10 "2023-02-27T15:29:42Z")

</div>

I hear you Frank. We are uh… almost done switching 😉

---

<div class="post-metadata">

**Author:** ![philip.scadding](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/philip.scadding/32/30_2.png) [@philip.scadding](https://community.shotgridsoftware.com/u/philip.scadding)\
**Post date:** [March 10, 2023, 12:35pm UTC](https://community.shotgridsoftware.com/t/amis-stopped-working-on-osx-monterey/16886/11 "2023-03-10T12:35:02Z")

</div>

One thing I found helped when trying to get the AMI to work on MacOS was to add a `try ... on error errStr` to the apple script to capture the error coming from the execution of the python script.

```auto
on open location this_URL
	try
		do shell script "some_script.py '" & this_URL & "'"
	on error errStr
		display dialog "error" & errStr
end open location

```

---

<div class="post-metadata">

**Author:** ![frank](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/frank/32/247_2.png) [@frank](https://community.shotgridsoftware.com/u/frank)\
**Post date:** [March 11, 2023, 4:02am UTC](https://community.shotgridsoftware.com/t/amis-stopped-working-on-osx-monterey/16886/12 "2023-03-11T04:02:17Z")

</div>

Very good point Philip, thanks. I was so busy wrestling with the protocol handler part that I wasn’t even thinking about putting that sort of sanity check in there.  
All working now, I just need to suppress this annoying “Press tun to run this script?” dialog somehow that never used to pop up before…

---

<div class="post-metadata">

**Author:** ![Ricardo\_Musch](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/ricardo_musch/32/405_2.png) [@Ricardo\_Musch](https://community.shotgridsoftware.com/u/Ricardo_Musch)\
**Post date:** [March 12, 2023, 10:32pm UTC](https://community.shotgridsoftware.com/t/amis-stopped-working-on-osx-monterey/16886/13 "2023-03-12T22:32:33Z")

</div>

Apple are constantly messing with the security settings on Mac OS so you are likely running into some new security warning.

---

<div class="post-metadata">

**Author:** ![frank](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/frank/32/247_2.png) [@frank](https://community.shotgridsoftware.com/u/frank)\
**Post date:** [March 12, 2023, 11:04pm UTC](https://community.shotgridsoftware.com/t/amis-stopped-working-on-osx-monterey/16886/14 "2023-03-12T23:04:19Z")

</div>

Yes, I am very, very, very tired of Apple

---

<div class="post-metadata">

**Author:** ![frank](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/frank/32/247_2.png) [@frank](https://community.shotgridsoftware.com/u/frank)\
**Post date:** [March 20, 2023, 10:01pm UTC](https://community.shotgridsoftware.com/t/amis-stopped-working-on-osx-monterey/16886/15 "2023-03-20T22:01:41Z")

</div>

Finally got an updated plist from support that fixed it. Lots of info lost in communication with Autodesk Support these days. I guess that is what you get for using an Indian call centre instead of actual product specialists.
