[MacPorts] #45564: python27: platform.mac_ver() fails

MacPorts noreply at macports.org
Wed Oct 22 14:36:49 PDT 2014


#45564: python27: platform.mac_ver() fails
-----------------------------+-------------------
  Reporter:  xixi.wang577@…  |      Owner:  jwa@…
      Type:  defect          |     Status:  new
  Priority:  Normal          |  Milestone:
 Component:  ports           |    Version:  2.3.2
Resolution:                  |   Keywords:
      Port:  python27        |
-----------------------------+-------------------

Comment (by xixi.wang577@…):

 Replying to [comment:8 jmr@…]:
 > This appears to actually be python27 failing to parse your
 /System/Library/CoreServices/SystemVersion.plist.
 >
 > Start MacPorts python2.7 and run this to confirm:
 > {{{
 > import platform
 > platform.mac_ver()
 > }}}
 > That is meant to return something like this:
 > {{{
 > ('10.10', ('', '', ''), 'x86_64')
 > }}}

 Hi, I'm using python27-apple and after running the commands, I got

 {{{
   File "<stdin>", line 1, in <module>
   File
 "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/platform.py",
 line 809, in mac_ver
     info = _mac_ver_xml()
   File
 "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/platform.py",
 line 786, in _mac_ver_xml
     pl = plistlib.readPlist(fn)
   File
 "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plistlib.py",
 line 78, in readPlist
     rootObject = p.parse(pathOrFile)
   File
 "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plistlib.py",
 line 406, in parse
     parser.ParseFile(fileobj)
 xml.parsers.expat.ExpatError: XML or text declaration not at start of
 entity: line 2, column 0
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/45564#comment:9>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list