# Python invoke method-- Help

**URL:** <https://forum.uipath.com/t/python-invoke-method-help/299646>\
**Category:** Studio\
**Tags:** activities-panel, question, studio, python, activities\
**Created:** [March 19, 2021, 3:29pm UTC](https://forum.uipath.com/t/python-invoke-method-help/299646 "2021-03-19T15:29:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anjali\_Rani](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/anjali_rani/32/192140_2.png) [@Anjali\_Rani](https://forum.uipath.com/u/Anjali_Rani)\
**Post date:** [March 19, 2021, 3:29pm UTC](https://forum.uipath.com/t/python-invoke-method-help/299646/1 "2021-03-19T15:29:21Z")

</div>

hi can anyone tell me why this error is throwing?

 ![image](https://global.discourse-cdn.com/uipath/original/3X/0/1/01e54449997ac80725aecdd57dd135f96ee4441b.png)

20.10.6+Branch.master.Sha.37657ef79003ea8751ac4efb35736eeeace8b2ce

Source: Invoke Python Method

Message: One or more errors occurred.

Exception Type: System.AggregateException

RemoteException wrapping System.AggregateException: One or more errors occurred. —\> RemoteException wrapping System.InvalidOperationException: Error invoking Python method —\> RemoteException wrapping System.NullReferenceException: Object reference not set to an instance of an object.  
at UiPath.Python.Impl.OutOfProcessEngine.\<\>c\_\_DisplayClass14\_0.b\_\_0()  
at System.Threading.Tasks.Task`1.InnerInvoke()  
at System.Threading.Tasks.Task.Execute()  
— End of stack trace from previous location where exception was thrown —  
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)  
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)  
at UiPath.Python.Activities.InvokeMethod.d\_\_16.MoveNext()  
— End of inner exception stack trace —  
at UiPath.Python.Activities.InvokeMethod.d\_\_16.MoveNext()  
— End of inner exception stack trace —  
at UiPath.Shared.Activities.AsyncTaskCodeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)  
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)  
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

---

<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 19, 2021, 3:33pm UTC](https://forum.uipath.com/t/python-invoke-method-help/299646/2 "2021-03-19T15:33:42Z")

</div>

@Anjali_Rani

Can you try with a simple python program and call that method

Just write as below

def test():  
return ‘test passed’

print(test())

Hope this may help you

Thanks

---

<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:** [March 22, 2021, 3:33pm UTC](https://forum.uipath.com/t/python-invoke-method-help/299646/3 "2021-03-22T15:33:56Z")

</div>

Closed on March 22, 2021, 3:33pm UTC

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