karate.exec(['python3', 'filename.py', 'arg'])
is ignoring the argument
I have a secretkey declared in karate-config.js file and use the variable in all my feature files, but that is not accessible in filename.py(which is obvious). So, I am using
karate.exec(['python3', 'filename.py', secretkey])
where secretkey is an argument for a function in filename.py.
The problem here is karate is ignoring the argument i.e., secretkey. I am trying to access it in filename.py as sys.argv[1]
The result is IndexError: list index out of range
; because karate is ignoring the argument
DEBUG com.intuit.karate - command: [python3, Ingest-snapshot.py]