EOFError everytime i solve problem using python

everytime i run custom test cases it goes well but when i compile code it shows EOFError. I am using python3 and i have tried try and except EOFError as e: print(“EOFError”)