Im using correct dlls and folders.
python 3.9.8 version
But receiving error in Python scope itself.
Kindly suggest alter techniques to invoke python code.
Check for Python environment configuration within UiPath, ensuring all dependencies are correctly installed and accessible to the Python Scope activity. Verify the Python version compatibility with UiPath and the specific libraries being used. If the issue persists, consider alternative methods like using the “Start Process” activity to execute Python scripts directly, or wrapping the Python code in a command-line executable that UiPath can call.
Thanks you @Mir.Jasimuddin ,
Do we need to specify python.exe python anywhere in python scope activity.
can u correct which dll path i should provide
but i tried all below
@Tapas_Kumar_Pattnaik - Is your Python script running in the Python compiler/terminal correctly? | i have provided dll and correct python path. And tried with timeout property too. No luck
@Anil_G - I will try with .net 6 once installed. And thanks for correcting dll file-python39.dll
For Python Scope: Set “Path” to your Python installation folder (e.g., C:\Python39), not python.exe. “Library path” goes to its Lib folder. Ensure all Python dependencies are installed.
For first-run failures: These often stem from timing or dynamic UI elements. Implement delays before actions or set WaitForReady for UI activities. Refine selectors using UI Explorer, focusing on stable attributes rather than volatile ones, to ensure consistent element identification.
Hey! If Python Scope is throwing an error even though you’re using the right setup, it’s likely a version compatibility issue — UiPath doesn’t fully support Python 3.9. Try switching to Python 3.7, which is more stable with UiPath.
Also make sure:
UiPath and Python are both 64-bit or both 32-bit.
You’re pointing to the correct python.exe in Python Scope.
The environment type in Python Scope matches your setup (e.g., Python 3.x).
Alternative: Use Start Process to call the script directly:
Run python.exe with your script path as an argument.
Capture results via logs or file output.
Let me know if you need an example for that setup!
Ensure the path in Python Scope matches the actual installation of Python 3.9.8.
Example: C:\Users<User>\AppData\Local\Programs\Python\Python39\python.exe
Use Compatible Python Version
UiPath officially supports Python 3.6 to 3.9. You’re using 3.9.8, which should work, but try 3.8.x if issues persist.
Run Studio as Administrator
Sometimes permission issues block Python integration. Try launching UiPath Studio as Administrator.
Install Required Packages
Ensure all Python packages used in your script are installed and accessible via the same Python environment.
Check for 32-bit vs 64-bit Conflicts
UiPath Studio is typically 64-bit. Make sure your Python installation matches (64-bit).
To use a Python script in UiPath, you need to use the UiPath.Python.Activities package. This allows you to invoke Python scripts and use their functions within UiPath workflows.
For installation
Install the Required Package
2.Open UiPath Studio
3.Go to Manage Packages (Ctrl+P)
4.Search for UiPath.Python.Activities
5.Click Install and then Save
To use that.
1.use Load Python Scope
2.Load python script for i.e load and function which would add two number.
3.Invoke python method and pass the parameter or agument to add two number and save result in variable.
4.Get python object to get result in varibale
If its not working below pointer need to check.
Check Python Version Compatibility
Ensure Script Has a Return Value
Python Script Errors Silently Failing run Python Manually First.
Above image start process worked and generated output after i changed py file path from “c/onedrive-alliance/xyz.py” into “c/local/temp/xyz.py” because strings comes after - char taking as argument, hence received terminal error like “c/onedrive” not exist.
Start process i can use. However i need work with python scope after installation of .NET 6
As of now you can try to use start process activity where in file : you can provide the file path of the python script where it should be in .py and then try to run this script as well
Please open cmd where you can provide the path and check script is running or not if any errors please share the screenshot for the same.
Happy automation!