Open Command Prompt
where python and press Enter
Copy the path and provide it as the path in Python scope
If I put exactly what “where python” returns I obtain an error. If I use the path “C:\python3” occurs the same, the program do nothing
Just to double check, could you do the simple test from the topic below?
I have similar issue, process stuck at Python Scope and give no response.
I found RC is converting to Windows and then problems occurs, if revise back to earlier project then it is ok.
Not sure if we have same RC, but worthing trying.
I got help from UiPath support and this issue got resolved after having the python dll path updated in the library path as shown below
I was able to run python code after installing .NET 5.0.17 Desktop Runtime and by providing below settings for Python Scope Activity v1.6.0.
For Python 3.9.16:
Working Folder: Working folder of the script.
For Python 3.10:
Library Path: “C:\Users\USERNAME\AppData\Local\Programs\Python\Python310\python310.dll”
Working Folder: Working folder of the script.
Hi, I am still facing this issue. Are there any fixes to this?
Python scope is working fine with the projects made in Windows-legacy model, but the same code when copied to a latest Windows project, it’s getting stuck in python scope. No error at all!
> > This one works fine
Please assist, as this is kind of very annoying.
please install .NET Desktop Runtime 5.0.17 Download .NET 5.0 Desktop Runtime (v5.0.17) - Windows x64 Installer (microsoft.com)
Would you mind giving the two workarounds/fixes mentioned above a go and reporting back if the issue persists?
Hi, I installed the .NET desktop runtime and the bot is working fine now. Thanks a lot.
Just a question:
- Do we need to install the same when migrated to a production VM?
Hi, the above fix seems working fine. Can we expect a permanent fix from UiPath’s side any time soon? May be a package which is compatible with the latest windows update or something.
Since it requires additional installation with admin access, a lot of process has to be carried out for approval on an organization level.
Yes, .net 5.0.17 runtime installation is required.
After spending quite some time in trying to solve this issue, two tips for others facing the same issue of Python Scope hanging up:
- Note that if you search for “download .NET Desktop Runtime” you easily end up downloading .NET 7.0 SDK, which unfortunately does not include an updated Desktop Runtime. The components can be found here: https://dotnet.microsoft.com/en-us/download/dotnet/7.0
- Also, while the hanging up problem was solved by downloading Desktop Runtime 5, my robot would still crash when loading the Python script; however, updating to Desktop Runtime 7 finally fixed the issue.
Hello Juho, I did perform all the recommended steps, but still my execution is hanging at python scope and nothing is working beyond that in the windows model. Earlier I was using python 3.11.2 but then I even tried with with python 3.10.9. Please find the merged screenshots for your reference and let me know if I am missing anything?
I came upon the Python Scope issue on another computer with another Windows Legacy project migrated to Windows, and this time updating the Desktop Runtime did not solve the issue. I will try to run the project on the computer where Python works, maybe that sheds some light into where the issue is.
Ok, now I have some more insight on the issue.
I moved my robot from one computer with Studio 2022.10.5 Enterprise to another with Studio 2023.4.0 Community Edition. The only change I did was to redirect the python code location (which I define in a separate file) to another location. (I’ve tested both computers and the python interpreter runs from the command line in that address, so it should not be an python environment or path issue.)
When opening the project on the new computer, UiPath seemed to encounter errors (log available for UiPath support on request) but offered to fix them “Automatically cleaning dependencies and imports in your workflows may fix the problem”, Having done so, the Python scope initialises without hanging up. So it seems to be that the newer version can fix the problem automatically. I took note of the output and will send a support request to UiPath.
Having tested this, the conclusion is that with UiPath Studio 2022.10.5 you need to use Python Package 1.4 and .NET Runtime 5 while with 2023.4 you can use 1.6 and .NET Runtime 7 to run Python.
The combination of UiPath Studio 2022.10.4, .NET Runtime 5, and the Python Package 1.4, works for me. I had to revert Python back to Python 3.9 though.
I am still facing the issue after installing .net runtime. The python scope is keep running and does not throw any error. Can anyone help me on this.
Can you please share a screenshot of the Properties pane of the Python Scope activity?
Also please share a screenshot of Output Pane.