Error in loading python script in python scope

Hi,
I am trying to use python scope activity to invoke python script but after running workflow it show
Source: Load Python Script
Message: Error loading Python script
Exception Type: System.InvalidOperationException

If i am running my script manually it runs successfully but when i invoke in uipath it show error.
I have attach my workflow, script and images also.
Thank you
AkshayRPA_IMAGE_TO_PDF_PROJECT22.zip (391.7 KB)

Hi @Akshay_Singh

Could you give these topics a read?
https://forum.uipath.com/search?q=Error%20loading%20Python%20script%20status:solved

Each contains a post marked as a solution to this error message.

yes i have read this but than also it showing same error.
That why i have raised this question.

i saw your code
wanted to know few things

  1. why you what’s your pc architecture 32 bit or 64 bit
    if its 64 bit then you have set it wrong in python scope activity

  2. Your python code does not accept any parameters then why are you passing the path from uipath to the code?
    your function is
    def testfun():
    not def testfun(some_argument):

  3. version keep it AUTO in python scope
    i will attach the modified python and uipath code try if it works

ya its 64 bit
Ok than in parameter i should leave it empty?
and my function is def testfun(): so i have pass it as “testfun” only .
Can you help me out

1 Like

yes and donot pass anything in input parameters in invoke python method and set the version as automatic in python scope

ok than in NAME section i should write function name as “testfun”?

yes correct

but again it showing error

facing same problem, is this solved?