Invoke python method excel

I have a problem with invoke python method. Here’s an example.

def printhello(x):
return "hello world " + str(x)

For the above function, I used 9 and “meow” as InputParameters and it able to return “hello world 9” and “hello world meow”.

import pandas as pd
def printhello(x):
df = pd.read_excel(x)
return df.columns

I modified the function to this and use “hello.xlsx”. However, I encountered error at Invoke Python Method where the error is pipe is broken. Is excel file isn’t allowed to be used as input? What is the way for me to input excel file correctly for it to be read by uipath?

Hello @nr.arinaazizi

Did you tried to tried to execute any very simple code using invoke python activity?
If not just try it and make sure the error is not happening due to the configuration.

yes i tried it with below and it works out fine

def printhello(x):
return "hello world " + str(x)

can you just try the below. Just to check the import of pandas library is causing any issue here.

import pandas as pd
def printhello(x):
return "hello world " + str(x)

import pandas and still works out fine so the problem isn’t due to pandas

Did you tried the same code in any IDE?

yup and every IDE shows result

i also found out this person has the same problem as mine. followed among the suggestions but still error Invoke Pythod Method Error

In studio installation folder, in Program Files\UiPath\Studio\uipath.config file update MaxMessageSizeInMegaBytes to larger number. This would help you. Give a try and let us know the outcome.

change from 10 to 100 and 200 and the pipe still broken. changed to 300, 500 and 1000 but the error is “RemoteException wrapping System.Exception: Job stopped with an unexpected exit code: 0xFFFFFFFF”