May 2023 2 14 Report
Trying to use CMD-command in python script with "subprocess.run()"
I am trying to run a program I can only access through the CMD in a python script:
command = 'C: \\ Users \\ \\ Documents \\ chatbot.Cli \\ dotnet chatbot.Cli.dll export -f PlainText -p 140 -o "C: \\ Users \\ \\ Documents \\ .txt" --after "2023-05-18 09:00"'

subprocess.run(command, shell=True)
The error I am getting is the following:
'C:\Users\\Documents\chatbot.Cli\dotnet' is not recognized as an internal or external command,
operable program or batch file.
.NET 7.0 is installed and when I run the exact same command on the CMD it works perfectly fine.
Does anyone have an idea why?
Thank you :)
More Questions From This User See All

Life Enjoy

" Life is not a problem to be solved but a reality to be experienced! "

Get in touch

Social

© Copyright 2013 - 2024 KUDO.TIPS - All rights reserved.