I am having a problem getting my python variable (1 file) to pass to my bash script. The python program pulls the file (csv file) and assigns it to var1 and then passes it to the bash script. The bash script uploads it to a server. The bash script works, but when I try to pass a file variable from python to bash, it does not work. It looks like the variable is empty and I get only the file name being loaded into the server, not the data. All the files are located in the same folder (upload.py, upload_files.sh, data_file.csv) I am new to this, so any help much appreciated.
python script
import subprocess
var1 = "data_file.csv"
subprocess.call(["bash", "upload_files.sh", var1])
BASH Script (partial bash script with changed info)
#!bin/bash
#
export HOST=example_server.com
export DATA_FILE=$1
#
curl -X PUT -L --header "Content-Type: text/csv" --data-binary@${DATA_FILE} "https://${HOST}:21/sserver/api/v3/fs/server-1/bulk_upload/${DATA_FILE}"