influx-cli icon indicating copy to clipboard operation
influx-cli copied to clipboard

CLI not returning when called from Python

Open Fr4nc3sc0NL opened this issue 3 years ago • 0 comments

I'm trying to invoke the CLI from Python to upload some csvs, however the process never returns. I tried the following and variations on it:

p = subprocess.run(["influx write --bucket Tutorial -f data_hist.csv"]    , shell=True)
q = subprocess.run(["influx write --bucket Tutorial -f data_forecast.csv"], shell=True)

This shell script works fine and returns:

influx write --bucket Tutorial -f data_hist.csv
influx write --bucket Tutorial -f data_forecast.csv

Do you have any hunch what might be going on?

(Mirror https://stackoverflow.com/questions/74843134/influxdb-cli-does-not-return-when-called-from-python)

Fr4nc3sc0NL avatar Dec 18 '22 20:12 Fr4nc3sc0NL