# Invoke python method error

**URL:** <https://forum.uipath.com/t/invoke-python-method-error/236801>\
**Category:** Studio\
**Tags:** question, python, excel, activities\
**Created:** [July 9, 2020, 1:54am UTC](https://forum.uipath.com/t/invoke-python-method-error/236801 "2020-07-09T01:54:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yu.xingxing](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/yu.xingxing/32/177757_2.png) [@yu.xingxing](https://forum.uipath.com/u/yu.xingxing)\
**Post date:** [July 9, 2020, 1:54am UTC](https://forum.uipath.com/t/invoke-python-method-error/236801/1 "2020-07-09T01:54:13Z")

</div>

Hello everyone,i got a problem to consult with you.  
As you can see here,i use “Invoke Python Method”,the python code runs well,but in UiPath error occurs.

What the python code does is delete extra rows in excel,like from row 540 to row 543 shows in the third picture.

I want to tell you that the error occurs only when you really need to delete the rows.If the extra row are already deleted,the error will not occur in UiPath.

Do you know why ?

Thanks in advance.

 ![image](https://global.discourse-cdn.com/uipath/original/3X/a/6/a6a8bfcd52170f8f1d400d7eb343bdc1f338a017.png)  
 ![image](https://global.discourse-cdn.com/uipath/original/3X/e/9/e91b7ed16cceadc38a48bee97e4a475f53849546.png)  
 ![image](https://global.discourse-cdn.com/uipath/original/3X/5/0/50c916cf5def1d96ec054c79ef209c3072fe8e0b.png)

---

<div class="post-metadata">

**Author:** ![wusiyangjia](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/wusiyangjia/32/512258_2.png) [@wusiyangjia](https://forum.uipath.com/u/wusiyangjia)\
**Post date:** [July 9, 2020, 2:35am UTC](https://forum.uipath.com/t/invoke-python-method-error/236801/2 "2020-07-09T02:35:39Z")

</div>

Hi @yu.xingxing

Maybe you can try to simply use Start Process or Invoke Power Shell to run your python source by below command, and confirm if the error still occurs.  
…\AppData\Local\Programs\Python\Python36\Python.exe delete\_extra\_row.py
