Anthony stark Posted March 12, 2020 Posted March 12, 2020 Hi Guys, When running the following script : import datetime todayDate = datetime.date.today() if todayDate.day == 12: myfunction() else: pass I get the following error: name 'myfunction' is not defined at IronPython.Runtime.PythonContext.MissingName(SymbolId name) at Microsoft.Scripting.Runtime.LanguageContext.LookupName(CodeContext context, SymbolId name) at Microsoft.Scripting.Runtime.RuntimeHelpers.LookupName(CodeContext context, SymbolId name) at $29##29(Closure , Scope , LanguageContext ) at Microsoft.Scripting.SourceUnit.Execute(Scope scope, ErrorSink errorSink) Can anyone help with the resolution for this Thanks in advance
Karan Nisar Posted April 16, 2020 Posted April 16, 2020 In your if clause you are calling the function "myfunction". But it looks like you haven't written the"myfunction" in your script. You need to add a function with same name so your IronPython script can call that function and perform the necessary action that you intend to acheive.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now