Help with Automator running a shell script
I've set up a workflow in Automator to get operator input and select a folder from various locations depending on the input. I tested the capture of variables with print statements in a very basic python script and it executes as expected.
Now I'm trying to expand that python script to run the actual steps I need. I've tested the python script in IDLE and it works but when I try to run it from the Run Shell Script in Automator I get an error on some of the import statements. The python libraries are all installed (it runs in IDLE) but Automator doesn't like something that I'm doing (or not doing).
It fails on the import zxingcpp -- just for fun I've reordered the import statements and whenever it tries one of the last three it fails. All libraries are installed at
Location: /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages
I'm running iMac 27" Late 2015 Monterey v 12.6.4
Python 3.10.4
pip 23.0.1
zxing-cpp 2.0.0
I've been using AppleScript up until now with a lot of help from this community. AppleScript has been great but when moving or copying hundreds of images it often times out. This program not only will move hundreds of images but also is reading QR Codes to determine where to move them. I'm just getting started with python and so far each program has run in Automator, not this one. Any help is greatly appreciated.
/usr/bin/python3 <<'EOF' - "${@}"
import sys
import os
import csv
import shutil
import zxingcpp
import cv2
from PIL import Image
iMac 27″, macOS 12.6