# Passing Arguments In Python Script Using Uipath

**URL:** <https://forum.uipath.com/t/passing-arguments-in-python-script-using-uipath/525669>\
**Category:** Studio\
**Tags:** activities-panel, question, studio, python, activities\
**Created:** [March 13, 2023, 6:04pm UTC](https://forum.uipath.com/t/passing-arguments-in-python-script-using-uipath/525669 "2023-03-13T18:04:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abhi15](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/abhi15/32/176793_2.png) [@Abhi15](https://forum.uipath.com/u/Abhi15)\
**Post date:** [March 13, 2023, 6:04pm UTC](https://forum.uipath.com/t/passing-arguments-in-python-script-using-uipath/525669/1 "2023-03-13T18:04:24Z")

</div>

Hi,

I want to pass 4 arguments in the python script using UiPath  
1.input file path  
2.output file path  
3.mindate  
4.maxdate

Can you help me how to use python activities to pass these 4 values while running python script using studio.

---

<div class="post-metadata">

**Author:** ![Srini84](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/srini84/32/464032_2.png) [@Srini84](https://forum.uipath.com/u/Srini84)\
**Post date:** [March 13, 2023, 6:07pm UTC](https://forum.uipath.com/t/passing-arguments-in-python-script-using-uipath/525669/2 "2023-03-13T18:07:39Z")

</div>

@Abhi15

Check below post for your reference

> [@Passing arguments to Python](https://forum.uipath.com/t/passing-arguments-to-python/51294/17):
>
> Hi, [Capture1] Did try this but it returns an error saying that Invoke Method Activity has an error. [Capture2] This would return the string withing the double quotes. This is a very basic python code of adding operators!

Hope this may help you

Thanks,  
Srini

---

<div class="post-metadata">

**Author:** ![Abhi15](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/abhi15/32/176793_2.png) [@Abhi15](https://forum.uipath.com/u/Abhi15)\
**Post date:** [March 13, 2023, 6:09pm UTC](https://forum.uipath.com/t/passing-arguments-in-python-script-using-uipath/525669/3 "2023-03-13T18:09:44Z")

</div>

Hi those arguments are in multiple methods not in single method

---

<div class="post-metadata">

**Author:** ![Anil\_G](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/anil_g/32/524291_2.png) [@Anil\_G](https://forum.uipath.com/u/Anil_G)\
**Post date:** [March 13, 2023, 6:28pm UTC](https://forum.uipath.com/t/passing-arguments-in-python-script-using-uipath/525669/4 "2023-03-13T18:28:13Z")

</div>

@Abhi15

Then try like this,…for each method you can use separate invoke and pass the name and the related arguments. Assuming all are there in one script use a load script first and scope will take care of having the load script active for the following method…else we can create instances for multiple scripts and pass them for run scripts

![image](https://global.discourse-cdn.com/uipath/original/4X/a/a/5/aa57ccb203742fd620236727c6bef4f2eaf094ba.png)  
Method1:  
 ![image](https://global.discourse-cdn.com/uipath/original/4X/7/c/9/7c954c83bb2c107942ace298478649d57528375c.png)  
Method2:  
 ![image](https://global.discourse-cdn.com/uipath/original/4X/4/6/6/466b1a29161a38a21832ecbe8275adf3bf8e7cce.png)

Hope this helps

cheers
