# Invoke python method giving error

**URL:** <https://forum.uipath.com/t/invoke-python-method-giving-error/81223>\
**Category:** Help\
**Tags:** python, activities\
**Created:** [December 10, 2018, 8:40am UTC](https://forum.uipath.com/t/invoke-python-method-giving-error/81223 "2018-12-10T08:40:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kalyanDev](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/kalyandev/32/68715_2.png) [@kalyanDev](https://forum.uipath.com/u/kalyanDev)\
**Post date:** [December 10, 2018, 8:40am UTC](https://forum.uipath.com/t/invoke-python-method-giving-error/81223/1 "2018-12-10T08:40:16Z")

</div>

Hi ,  
i am getting this error while invoking the python method Error invoking Python method (this error occured while i am passing input parameter that contains dictionary variable)

my aim is to insert into mongo using python script from UiPath  
(python is working from python console but when i am inking using UiPath i am getting error)  
please help me , thanks.

---

<div class="post-metadata">

**Author:** ![saikumarkuncha](https://avatars.discourse-cdn.com/v4/letter/s/35a633/32.png) [@saikumarkuncha](https://forum.uipath.com/u/saikumarkuncha)\
**Post date:** [February 15, 2019, 6:51am UTC](https://forum.uipath.com/t/invoke-python-method-giving-error/81223/2 "2019-02-15T06:51:38Z")

</div>

Hi Kalyan,

Once check your Variable data type, and you should know what type of Data it will return. change the variable type into object or python object or if the method returns string then you have to change your variable type into string. once try this and let me know.

Thank you

---

<div class="post-metadata">

**Author:** ![Sheshrocks](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/sheshrocks/32/46480_2.png) [@Sheshrocks](https://forum.uipath.com/u/Sheshrocks)\
**Post date:** [February 15, 2019, 6:53am UTC](https://forum.uipath.com/t/invoke-python-method-giving-error/81223/3 "2019-02-15T06:53:03Z")

</div>

What is the error, paste the screenshot, please!
