ARTICLE AD BOX
I'm trying to use PyObjC (a bridge between the Python and Objective-C), version 12.1_3, to find the original file of a Finder alias, but I can't seem to get it right:
Python 3.13.13 (main, Apr 8 2026, 18:30:40) [Clang 21.0.0 (clang-2100.0.123.102)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from Foundation import NSURL >>> alias_path = "Apps/calibre" >>> url = NSURL.fileURLWithPath_(alias_path) >>> resolved_url,stale,error = url.initByResolvingAliasFileAtURL_options_error_(url,0,None) Traceback (most recent call last): File "<python-input-3>", line 1, in <module> resolved_url,stale,error = url.initByResolvingAliasFileAtURL_options_error_(url,0,None) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^ objc.error: NSGenericException - *** -[NSURL initByResolvingAliasFileAtURL:options:error:]: object already initialized >>>