Improved the error messages in the python backend
Removed a debug print statement