# Load Python Script error is coming

**URL:** <https://forum.uipath.com/t/load-python-script-error-is-coming/136942>\
**Category:** Help\
**Tags:** studio, python, activities\
**Created:** [July 25, 2019, 12:26pm UTC](https://forum.uipath.com/t/load-python-script-error-is-coming/136942 "2019-07-25T12:26:18Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Akshay\_Singh](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/akshay_singh/32/61284_2.png) [@Akshay\_Singh](https://forum.uipath.com/u/Akshay_Singh)\
**Post date:** [July 25, 2019, 12:26pm UTC](https://forum.uipath.com/t/load-python-script-error-is-coming/136942/1 "2019-07-25T12:26:18Z")

</div>

Hi i am trying to implement python script in workflow through python scope but after running the workflow error is coming as:-  
Source: Load Python Script  
Message:- Error loading script  
Exception type:- System.InvalidOperationException.  
I have attach workflow and script also.[Sequence1.xaml](https://forum.uipath.com/uploads/short-url/wlFhrX42lR8iqN1l3vIFLcQBYYn.xaml) (6.4 KB)

---

<div class="post-metadata">

**Author:** ![HareeshMR](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/hareeshmr/32/181825_2.png) [@HareeshMR](https://forum.uipath.com/u/HareeshMR)\
**Post date:** [July 25, 2019, 12:53pm UTC](https://forum.uipath.com/t/load-python-script-error-is-coming/136942/2 "2019-07-25T12:53:51Z")

</div>

@Akshay_Singh,

Can you add the code also? or else the screenshot of your code?

---

<div class="post-metadata">

**Author:** ![Akshay\_Singh](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/akshay_singh/32/61284_2.png) [@Akshay\_Singh](https://forum.uipath.com/u/Akshay_Singh)\
**Post date:** [July 25, 2019, 12:56pm UTC](https://forum.uipath.com/t/load-python-script-error-is-coming/136942/3 "2019-07-25T12:56:12Z")

</div>

![2019-07-25_18h25_40](https://global.discourse-cdn.com/uipath/original/3X/7/f/7fc56b1cb2c52b9172a01852afedf3d529352b50.png)

---

<div class="post-metadata">

**Author:** ![HareeshMR](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/hareeshmr/32/181825_2.png) [@HareeshMR](https://forum.uipath.com/u/HareeshMR)\
**Post date:** [July 25, 2019, 12:57pm UTC](https://forum.uipath.com/t/load-python-script-error-is-coming/136942/4 "2019-07-25T12:57:42Z")

</div>

Try removing last two lines of code @Akshay_Singh if it working perfectly when you are running it manually

---

<div class="post-metadata">

**Author:** ![Akshay\_Singh](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/akshay_singh/32/61284_2.png) [@Akshay\_Singh](https://forum.uipath.com/u/Akshay_Singh)\
**Post date:** [July 25, 2019, 1:01pm UTC](https://forum.uipath.com/t/load-python-script-error-is-coming/136942/5 "2019-07-25T13:01:54Z")

</div>

ya while running from pycham it run perfect

---

<div class="post-metadata">

**Author:** ![HareeshMR](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/hareeshmr/32/181825_2.png) [@HareeshMR](https://forum.uipath.com/u/HareeshMR)\
**Post date:** [July 25, 2019, 1:03pm UTC](https://forum.uipath.com/t/load-python-script-error-is-coming/136942/6 "2019-07-25T13:03:52Z")

</div>

> [@HareeshMR](#):
>
> Try removing last two lines of code

Just try this

---

<div class="post-metadata">

**Author:** ![Akshay\_Singh](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/akshay_singh/32/61284_2.png) [@Akshay\_Singh](https://forum.uipath.com/u/Akshay_Singh)\
**Post date:** [July 25, 2019, 1:06pm UTC](https://forum.uipath.com/t/load-python-script-error-is-coming/136942/7 "2019-07-25T13:06:21Z")

</div>

same error is coming

---

<div class="post-metadata">

**Author:** ![HareeshMR](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/hareeshmr/32/181825_2.png) [@HareeshMR](https://forum.uipath.com/u/HareeshMR)\
**Post date:** [July 25, 2019, 1:25pm UTC](https://forum.uipath.com/t/load-python-script-error-is-coming/136942/8 "2019-07-25T13:25:40Z")

</div>

Just give a try as, pass a argument in the function , may be the image path and pass the argument value from UiPath as

1. Declare a variable and assign the path to that
2. Then, pass that value in the Input parameters if Invoke Python Method activity as { variable }

then check @Akshay_Singh

---

<div class="post-metadata">

**Author:** ![Akshay\_Singh](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/akshay_singh/32/61284_2.png) [@Akshay\_Singh](https://forum.uipath.com/u/Akshay_Singh)\
**Post date:** [July 25, 2019, 1:33pm UTC](https://forum.uipath.com/t/load-python-script-error-is-coming/136942/9 "2019-07-25T13:33:26Z")

</div>

no bro not getting same issue  
i try like this

 ![2019-07-25_19h02_47](https://global.discourse-cdn.com/uipath/original/3X/9/4/94c2aae25678cf3ff7d87016c023294e6e0068e0.png)

---

<div class="post-metadata">

**Author:** ![HareeshMR](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/hareeshmr/32/181825_2.png) [@HareeshMR](https://forum.uipath.com/u/HareeshMR)\
**Post date:** [July 25, 2019, 3:43pm UTC](https://forum.uipath.com/t/load-python-script-error-is-coming/136942/10 "2019-07-25T15:43:05Z")

</div>

Its working exactly fine bro,

just give the path with double backslash (\\) wherever you have a slash @Akshay_Singh

---

<div class="post-metadata">

**Author:** ![Akshay\_Singh](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/akshay_singh/32/61284_2.png) [@Akshay\_Singh](https://forum.uipath.com/u/Akshay_Singh)\
**Post date:** [July 26, 2019, 4:42am UTC](https://forum.uipath.com/t/load-python-script-error-is-coming/136942/11 "2019-07-26T04:42:44Z")

</div>

In script?

---

<div class="post-metadata">

**Author:** ![HareeshMR](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/hareeshmr/32/181825_2.png) [@HareeshMR](https://forum.uipath.com/u/HareeshMR)\
**Post date:** [July 26, 2019, 6:07am UTC](https://forum.uipath.com/t/load-python-script-error-is-coming/136942/12 "2019-07-26T06:07:04Z")

</div>

yes @Akshay_Singh

---

<div class="post-metadata">

**Author:** ![Rahul\_Pasupuleti](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/rahul_pasupuleti/32/62938_2.png) [@Rahul\_Pasupuleti](https://forum.uipath.com/u/Rahul_Pasupuleti)\
**Post date:** [July 26, 2019, 9:45am UTC](https://forum.uipath.com/t/load-python-script-error-is-coming/136942/13 "2019-07-26T09:45:12Z")

</div>

Hi Akshyay,  
Try importing the Libraries inside the function.  
You can give the path with either “//” or ""

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/system/32/182466_2.png) [@system](https://forum.uipath.com/u/system)\
**Post date:** [August 6, 2019, 10:21am UTC](https://forum.uipath.com/t/load-python-script-error-is-coming/136942/14 "2019-08-06T10:21:46Z")

</div>

Closed on August 6, 2019, 10:21am UTC

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
