Unable to perform python activity in uipath

Hi Team,

I want to run python script in UiPath for that i am using python activity. but when i install python activity and ran the code by debugging i am getting error like:- “Error initializing python engine” and when i direct run file through UiPath getting error like:- “Python string reference not set to an instance of string”.

I am using python version:- 3.10

Please help me guys on this issue.
@lrtetala , @supriya117 , @Shiva_Nikhil , @Srini84 , @postwick

Hi @Smitesh_Aher1

  1. Ensure that Python is correctly installed on your machine.
  2. Verify the path to the Python executable is correctly set in your system’s PATH environment variable.

Hii @Smitesh_Aher1

Check if the Python activity package is installed in UiPath Studio. If not, you can install it from the UiPath Package Manager.

Make sure the Python environment is properly configured with the required packages and libraries for your Python script.

Verify that the Python executable is in the system’s PATH environment variable, allowing UiPath to find and execute Python scripts.

Double-check the configuration of the Python activity. Make sure you have set the input arguments and output arguments correctly. Also, ensure that the Python script is written correctly without syntax errors.

Cheers…!

Hi @Smitesh_Aher1

Here are some steps to help you troubleshoot and resolve the issue:

  1. Check Python Environment:
  • Make sure Python 3.10 is correctly installed on your machine.
  • Verify that Python is added to the system’s PATH environment variable.
  • Ensure you have installed the 64-bit version of Python if you’re using the 64-bit version of UiPath Studio.
  1. Python Activity Configuration:
  • Check your Python Scope activity and confirm that you have selected the correct Python environment in the PythonPath property. It should point to the Python installation directory (e.g., “C:\Python310”).
  1. UiPath.Python.Activities Package:
  • Ensure you have the latest version of the “UiPath.Python.Activities” package installed. You can check and update it from the “Manage Packages” menu in UiPath Studio.
  1. Python Version Compatibility:
  • Python 3.10 is relatively new, and some libraries or activities may not be fully compatible with it. You might consider switching to a more stable Python version, like Python 3.8 or 3.9, if possible.
  1. Python Script and Dependencies:
  • Review your Python script and check if there are any missing or incorrect dependencies that might be causing the issue.
  • Ensure that all required Python modules and libraries are installed in your Python environment.

Thanks for replying @supriya117 , @lrtetala , @Dilli_Reddy

I tried this all steps but still getting error( Error initializing python engine).

Hi @Smitesh_Aher1

Check to add the dll path as below

Hope this may help you

Thanks,
Srini

Hi @Srini84

I did this also… But still getting error.