Run Python File from Mid-Server using flow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2024 10:21 AM
Hi Team,
I created script action in flow that run python script file in Mid Server, I got error like this "
"
suggest me any solution for this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2024 09:44 PM
@Filipe Cruz
And also, I given path to environment variable as well

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2024 02:13 AM
Hi @Syed zabiullah ,
When you do C:\test\test\AppData\Local\Programs\Python\Python312\python.exe py --version, you are executing python.exe and providing "py" as an argument.
I think this is not correct.
use the following:
C:\test\test\AppData\Local\Programs\Python\Python312\python.exe --version
I also found this information in StackOverflow:
python
is the Python executable of the Python installation which you have selected as a default during the installation. This basically put the path to that version inside the PATH, so that the executable is directly available.
py
is the Python launcher which is a utility that comes with Python installations on Windows. It gets installed into C:\Windows\
so it’s available without requiring PATH modifications. The Python launcher detects what Python versions are installed on your machine and is able to automatically delegate to the right version. By default, it will use the latest Python version that is on your machine. So if you have installed 2.7, 3.5 and 3.6, running py
will launch 3.6. You can also specify a different version by doing e.g. py -3.5
to lauch 3.5, or py -2
to launch the latest Python 2 version on your machine.
so you can also try to do C:\Windows\py --version
Let me know if this helps!
Please, don't forget to mark my answer as correct if it solves your issue or mark it as helpful if it is relevant for you!
Best Regards,
Filipe Cruz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2024 02:35 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2024 07:13 AM
@Syed zabiullah
The error is not exactly the same!
Can you paste here a screenshot of your command line with the output of python --version?
Just to see the full path of your command line.
That should be the problem!