How to load a python script?

studio

#1

how to load a python script that does not contain any function(method)?
if i use libraries like pdfkit,pandas ill get a error like this.


#2

Can you post a sample of the script that isn’t working?


#3

I am receiving an error System.InvalidOperationException while loading python script …CAN SOMEONE HELP ME?
def tempId:
name = “Ankita Yadav”
a = “TEMP”
name = name.upper()
b = name[:2]
data= name.split()
surname = data[1]
c = surname[:3]
tempId = a + b + c
return tempId

We have also tried with
import sys
import os
sys.path.append(os.path.dirname(os.path.realpath(file)))
def tempId:
name = “Ankita Yadav”
a = “TEMP”
name = name.upper()
b = name[:2]
data= name.split()
surname = data[1]
c = surname[:3]
tempId = a + b + c
return tempId