Load Python Script: One or more errors occurred

A bit of extra info here.

The Python activities are invoked regardless of context, using only the Windows environment variables. If, for some reason, a certain path is not set or if a certain Python package is only available in a certain environment (e.g. in the Miniconda console you used to install a certain version of Python), then the script execution will fail.

As a simple verification, you should be able to run the script using nothing but the Windows Command Prompt.

<path to python.exe> <path to script.py>

If that doesn’t work, the Python activities won’t, either. You will surely see an error message of what doesn’t work. Your Python dedicated consoles (like Pycharm or Anaconda) have a lot of internal setup already performed, which the UiPath activities simply don’t have a way to do.

In this particular case, the dependent library was not available outside of the Python environment, which is why the Load Python Script activity failed.

@edang, I had a similar problem. I solved it using the path of the python interpreter in the “Path” and “WorkingFolder” fields in the python Scope activity. For me, it was the path “C:\ProgramData\Anaconda3\envs\PY36_TF2” in the 2 fields.
Make sure it works for you
Sem título

thanks man, your solution worked for <3 I just added my python script path in WorkingFolder of Input Uipath and it was good

Have you tried with Anaconda? My python path works with C:\Users\User\Anaconda3

However I notice if I add an import library line in my main script after Load Script such as
“from ibm_watson import AssistantV1” I get an error. Even if script isn’t using any from that package, it werrors out. My environment has that package installed already as I see it in my “Anaconda3\Lib\site-packages”.

I am not sure if this is still an issue, but if yes, you may need to install the respective python packages that you import manually in the system you execute the process.

You can do this by executing below command in command prompt [as admin]
pip install

Once done, try running the XAML and python script should load fine. Try and let me know if this helps.