Found the issue! One of the applications I installed earlier wrote some stuff in my user .profile. It contained a syntax error and that was causing the errors.
I removed it and can now launch applications. Keeping this here in case anyone comes across this! 