How do I locate and this Bundle Error

❌ Could not find email_ai.py in the app bundle. Available files: []

The error above is what I’m encountering.

I’ve placed the referenced file both in the project directory and inside the app. However, every time I remove and reinsert the file into the folder within the app, it prompts me to designate the targets—I select all, but this doesn’t resolve the issue.

I’m unsure how to properly reference the file so that it is recognised and included in the bundle. Any guidance would be greatly appreciated.

this is my build phase:

#!/bin/sh set -x # Prints each command before running it (for debugging) pwd # Shows the current working directory echo "$SRCROOT" # Shows what Xcode thinks is the project root ls -l "$SRCROOT/EmailAssistant/EmailAssistant/PythonScripts" # Lists files in the script folder

export PYTHONPATH="/Users/caesar/.pyenv/versions/3.11.6/bin" /Users/caesar/.pyenv/versions/3.11.6/bin/python3 "$SRCROOT/EmailAssistant/EmailAssistant/PythonScripts/email_ai.py"

echo "Script completed."

It’s not clear to me whether you’re having a problem:

  • Embedding the file into the app bundle

  • Or accessing a file that’s embedded in the app bundle

To distinguish between the two:

  1. Build your app.

  2. Choose Product > Show Build Folder in Finder.

  3. In the Finder, navigate to the app you just built, select it, secondary click, and choose Show Package Contents.

  4. Within the app bundle, look around to see if the file is embedded where you expect it to be.

Let us know whether the file is where you expect it to be.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

How do I locate and this Bundle Error
 
 
Q