kronenthaler / openstep-parser

OpenStep plist parser for python
BSD 2-Clause "Simplified" License
17 stars 17 forks source link

multiple targets xcodeproj load error #18

Closed ryzn0518 closed 4 years ago

ryzn0518 commented 5 years ago

As our iOS project is multiple targets, then load the xcodeproj error

from pbxproj import XcodeProject
path = 'test.xcodeproj/project.pbxproj'

project = XcodeProject.load(path)

it shows that, but if load the one target project, it work well, so phxproj not support multiple targets project?

Traceback (most recent call last):
  File "/Users/test/Documents/web_project/ci_ios/xcbuild/tests/testproj.py", line 9, in <module>
    project = XcodeProject.load(path)
  File "/Users/test/Library/Python/2.7/lib/python/site-packages/pbxproj/XcodeProject.py", line 64, in load
    tree = osp.OpenStepDecoder.ParseFromFile(open(path, 'r'))
  File "/Users/test/Library/Python/2.7/lib/python/site-packages/openstep_parser/openstep_parser.py", line 43, in ParseFromFile
    return cls.ParseFromString(fp.read().decode('UTF-8'))
  File "/Users/test/Library/Python/2.7/lib/python/site-packages/openstep_parser/openstep_parser.py", line 47, in ParseFromString
    return OpenStepDecoder()._parse(str)
  File "/Users/test/Library/Python/2.7/lib/python/site-packages/openstep_parser/openstep_parser.py", line 56, in _parse
    result, index = self._parse_dictionary(str, index)
  File "/Users/test/Library/Python/2.7/lib/python/site-packages/openstep_parser/openstep_parser.py", line 68, in _parse_dictionary
    index = self._parse_dictionary_entry(str, index, obj)
  File "/Users/test/Library/Python/2.7/lib/python/site-packages/openstep_parser/openstep_parser.py", line 98, in _parse_dictionary_entry
    value, index = self._parse_value(str, index)
  File "/Users/test/Library/Python/2.7/lib/python/site-packages/openstep_parser/openstep_parser.py", line 170, in _parse_value
    value, index = self._parse_dictionary(str, index)
  File "/Users/test/Library/Python/2.7/lib/python/site-packages/openstep_parser/openstep_parser.py", line 68, in _parse_dictionary
    index = self._parse_dictionary_entry(str, index, obj)
  File "/Users/test/Library/Python/2.7/lib/python/site-packages/openstep_parser/openstep_parser.py", line 98, in _parse_dictionary_entry
    value, index = self._parse_value(str, index)
  File "/Users/test/Library/Python/2.7/lib/python/site-packages/openstep_parser/openstep_parser.py", line 170, in _parse_value
    value, index = self._parse_dictionary(str, index)
  File "/Users/test/Library/Python/2.7/lib/python/site-packages/openstep_parser/openstep_parser.py", line 68, in _parse_dictionary
    index = self._parse_dictionary_entry(str, index, obj)
  File "/Users/test/Library/Python/2.7/lib/python/site-packages/openstep_parser/openstep_parser.py", line 98, in _parse_dictionary_entry
    value, index = self._parse_value(str, index)
  File "/Users/test/Library/Python/2.7/lib/python/site-packages/openstep_parser/openstep_parser.py", line 174, in _parse_value
    value, index = self._parse_literal(str, index)
  File "/Users/test/Library/Python/2.7/lib/python/site-packages/openstep_parser/openstep_parser.py", line 148, in _parse_literal
    key += d[str[index]]
KeyError: u'U'
kronenthaler commented 5 years ago

Thanks for your report, could you share the project.pbxproj that is causing the issue?

github-actions[bot] commented 4 years ago

This issue has become stale, the required information has not been provided and it is been marked for closure in the next 5 days

github-actions[bot] commented 4 years ago

This issue has become stale, the required information has not been provided and it is been marked for closure in the next 5 days