Python: Why does os.getcwd() sometimes crash with OSError? December 1, 2023 by Tarik The current directory may have been deleted by another process.