Probably due to `os.name == "darwin"` check to use `open` MacOS is "posix"; use `sys.platform` instead