0
BETON_FILE_NAME = "testfile2"

srun $pythonExec write_beton.py --mode 'xxx' \
                                --labeled_file_path 'yyy' \
                                --beton_file_name $BETON_FILE_NAME \
                                --description 'zzz'

I am running a python script from slurm batch file and passing arguments through argument parser. I am trying to pass a bash variable as an argument to python script and it is giving the following error

write_beton.py: error: argument --beton_file_name: expected one argument

  • The spaces around the equals sign are basically a syntax error. You will also want to add quotes as a general guidance – tripleee Mar 17 '22 at 08:42

0 Answers0