Thanks to roblabla, whereami no longer errors if run from console :D