[Python Activities RemoteException wrapping System.AggregateException: One or more errors occurred. ]

Im getting this error when trying to invoke Python Method.

Here are details:
Python activities = version 1.9.0
Python = Python 3.12.10
.NET = 8.0.414

This is full error in Locals:
RemoteException wrapping System.AggregateException: One or more errors occurred. (Invalid method name) —> RemoteException wrapping System.InvalidOperationException: Invalid method name
at UiPath.Python.Activities.InvokeMethod.ExecuteAsync(AsyncCodeActivityContext context,
CancellationToken cancellationToken)
— End of inner exception stack trace —
at UiPath.Shared.Activities.AsyncTaskCodeActivity.EndExecute(AsyncCodeActivityContext context,
IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor,
BookmarkManager bookmarkManager)

Here is my Python Code:

def say_hello():
return f"Hello! Python is working in UiPath."

@kazarel

as per error looks like the Name of python method might be wrong..can you please verify

I know as per the data provided it looks good..jsut to confirm try to remove _ and check may be that might be creating an issue

also is it failing on scope or invoke only?

cheers

I think its failing on Invoke only. this is the output error

I modified my python to have no _

def testText():
return f"Python is working in UiPath."

Python scope:

Load python:

Invoke Method:

Get object:

1 Like

@kazarel

Is testText a variable that you created?

As if its a string it should be between double quotes

If variable make sure you add the name pr assign name to that variable and that name should be testText again..

Cheers

Got it to work already. Thanks

1 Like

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