Error with OS Lib - revit could not complete the external command

Ok, so os.chdir works but i stil don’t know why it doesn’t work with other methods…

os.chdir(os.path.dirname(os.path.abspath(__file__)))