# How to pass the input parameters in invoke python method?

**URL:** <https://forum.uipath.com/t/how-to-pass-the-input-parameters-in-invoke-python-method/724623>\
**Category:** Help\
**Tags:** properties-panel, question, python, studio, activities\
**Created:** [March 6, 2024, 6:51am UTC](https://forum.uipath.com/t/how-to-pass-the-input-parameters-in-invoke-python-method/724623 "2024-03-06T06:51:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JackyLeung123](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/jackyleung123/32/263303_2.png) [@JackyLeung123](https://forum.uipath.com/u/JackyLeung123)\
**Post date:** [March 6, 2024, 6:51am UTC](https://forum.uipath.com/t/how-to-pass-the-input-parameters-in-invoke-python-method/724623/1 "2024-03-06T06:51:37Z")

</div>

I need to pass two variables into the python code from UiPath.

 ![image](https://global.discourse-cdn.com/uipath/original/4X/b/3/7/b37429a0c63aa00282f065c7ae83e2c6c6d278e3.png)  
The image above shows two variables that I need to use in python.  
name is a string and choices is a list.

However, the error shows below. How can I fix this issue?  
 ![image](https://global.discourse-cdn.com/uipath/original/4X/b/f/1/bf16a8a1ce5568e998747fa0f23d5466968e97b6.png)

---

<div class="post-metadata">

**Author:** ![JackyLeung123](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/jackyleung123/32/263303_2.png) [@JackyLeung123](https://forum.uipath.com/u/JackyLeung123)\
**Post date:** [March 6, 2024, 6:53am UTC](https://forum.uipath.com/t/how-to-pass-the-input-parameters-in-invoke-python-method/724623/2 "2024-03-06T06:53:33Z")

</div>

![image](https://global.discourse-cdn.com/uipath/original/4X/f/0/2/f0288c31dc797de4ba9d6fb1e3765c685a24876a.png)

---

<div class="post-metadata">

**Author:** ![ashokkarale](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/ashokkarale/32/474400_2.png) [@ashokkarale](https://forum.uipath.com/u/ashokkarale)\
**Post date:** [March 6, 2024, 8:38am UTC](https://forum.uipath.com/t/how-to-pass-the-input-parameters-in-invoke-python-method/724623/3 "2024-03-06T08:38:31Z")

</div>

@JackyLeung123 ,

In the `InputParameters` property, you can pass your arguments as an `Object[]` array. For example

`Object[] inputParameters = new Object[] { "Hello", "World", somePythonObject }`

Prepare this object and then pass.

In your Python code, you can access these arguments as you would in a regular Python function, like `arg1`, `arg2`, and `arg3`.

Thanks,  
Ashok 🙂
