Decorators with def main() not working in python

I am running into the following issue when I use a decorator with def main()
error:
ExecutionErr: error during execution of the script:
Error parsing code: Got unexpected EOF at byte offset 617
error:
ExecutionErr: error during execution of the script:
Error parsing code: Got unexpected EOF at byte offset 617
Wondering if this is windmill runtime specific config issue? It works well if I use the decorator on any other method and call it inside main. See below the code:
def my_decorator(func):
def wrapper():
print("Something is happening before the function is called.")
func()
print("Something is happening after the function is called.")
return wrapper

@my_decorator
def main():
print("The main function is running.")
def my_decorator(func):
def wrapper():
print("Something is happening before the function is called.")
func()
print("Something is happening after the function is called.")
return wrapper

@my_decorator
def main():
print("The main function is running.")
3 Replies
rubenf
rubenf7mo ago
We will take a look
Karthik | Langtrace AI
Thank you
Hugo
Hugo6mo ago
This is now fixed