# System.AggregateException in loading Python Script

**URL:** <https://forum.uipath.com/t/system-aggregateexception-in-loading-python-script/303763>\
**Category:** Studio\
**Tags:** breakpoints-management, question, studio, python, activities\
**Created:** [April 5, 2021, 12:37pm UTC](https://forum.uipath.com/t/system-aggregateexception-in-loading-python-script/303763 "2021-04-05T12:37:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vaishnavi\_k.l](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/vaishnavi_k.l/32/209120_2.png) [@Vaishnavi\_k.l](https://forum.uipath.com/u/Vaishnavi_k.l)\
**Post date:** [April 5, 2021, 12:37pm UTC](https://forum.uipath.com/t/system-aggregateexception-in-loading-python-script/303763/1 "2021-04-05T12:37:34Z")

</div>

Hi !

I am getting System.AggregateException when trying to load a Python Script in UiPath.

Attached the xaml File for reference.  
Trying the Voice to Text feature using Python Script

@Hiba_B @loginerror can you look at this pls.

 ![image](https://global.discourse-cdn.com/uipath/original/3X/8/5/850ca159792ae2e2c943f64c0b120475d046e15c.png)  
[VoiToText.xaml](https://forum.uipath.com/uploads/short-url/fgT96NJgV3kwCDYLDequdS2kc3R.xaml) (6.4 KB)

---

<div class="post-metadata">

**Author:** ![loginerror](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/loginerror/32/22614_2.png) [@loginerror](https://forum.uipath.com/u/loginerror)\
**Post date:** [April 6, 2021, 3:37pm UTC](https://forum.uipath.com/t/system-aggregateexception-in-loading-python-script/303763/2 "2021-04-06T15:37:47Z")

</div>

Hi @Vaishnavi_k.l

Any chance you could share a dummy project that reproduces the issue for you?

Also, have you already tried to update the Python activity package to the latest version?

Lastly, please have a look at this post:

> [@Load Python Script: One or more errors occurred](https://forum.uipath.com/t/load-python-script-one-or-more-errors-occurred/264497/23):
>
> 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\> …

---

<div class="post-metadata">

**Author:** ![Vaishnavi\_k.l](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/vaishnavi_k.l/32/209120_2.png) [@Vaishnavi\_k.l](https://forum.uipath.com/u/Vaishnavi_k.l)\
**Post date:** [April 7, 2021, 10:11am UTC](https://forum.uipath.com/t/system-aggregateexception-in-loading-python-script/303763/3 "2021-04-07T10:11:10Z")

</div>

Hi @loginerror Here is my Demo Project also attached the Python file which converts Text to Voice.

VoiToText.xaml is the file created with Python Activities.  
Email Ready is the file that has Python Code.  
The [EmailReader.zip](https://forum.uipath.com/uploads/short-url/l2J1HIaMc1qmWEOUyjHZGJLixC6.zip) (355 Bytes)

[Vaish\_FirstDemo.zip](https://forum.uipath.com/uploads/short-url/dkxvo0FwXOl51Z9LlX5BqtNQOEn.zip) (20.2 KB)

BTW , am not clear about the above solution you have attached 🙂 as am new to UiPath and Python

---

<div class="post-metadata">

**Author:** ![loginerror](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/loginerror/32/22614_2.png) [@loginerror](https://forum.uipath.com/u/loginerror)\
**Post date:** [April 12, 2021, 7:51am UTC](https://forum.uipath.com/t/system-aggregateexception-in-loading-python-script/303763/4 "2021-04-12T07:51:44Z")

</div>

> [@Vaishnavi\_k.l](#):
>
> BTW , am not clear about the above solution you have attached 🙂 as am new to UiPath and Python

It is about trying to run the script from Windows CMD by using:

 ![image](https://global.discourse-cdn.com/uipath/original/3X/0/6/06bba91cda2c8c5ce69eed6078621a5d836046f3.png)

It is to verify that all Windows environment variables are correctly set.

---

<div class="post-metadata">

**Author:** ![Vaishnavi\_k.l](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/vaishnavi_k.l/32/209120_2.png) [@Vaishnavi\_k.l](https://forum.uipath.com/u/Vaishnavi_k.l)\
**Post date:** [April 19, 2021, 11:20am UTC](https://forum.uipath.com/t/system-aggregateexception-in-loading-python-script/303763/5 "2021-04-19T11:20:50Z")

</div>

Thanks for your Help @loginerror . Your Answers helped me a lot. 🙂 Now it is working!
