kronenthaler/mod-pbxproj

[BUG]

Closed this issue · 1 comments

Describe the bug
**saving does not work. I get crash when try save **

System information

  1. pbxproj version used: pbxproj-2.10.0
  2. python version used: Python 2.7.17
  3. Xcode version used: 11.3.1

To Reproduce
Steps to reproduce the behavior:
project = XcodeProject.load('project.pbxproj')
project.save()

Expected behavior
save file

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
call stack
File "/Users/polishenko/Documents/reps/test/fixIosResBuild/test.py", line 61, in
project.save()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pbxproj/XcodeProject.py", line 35, in save
f.write(self.repr() + "\n")
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pbxproj/XcodeProject.py", line 47, in repr
return '// !$UTF8$!\n' + super(XcodeProject, self).repr()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pbxproj/PBXGenericObject.py", line 75, in repr
return self._print_object()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pbxproj/PBXGenericObject.py", line 83, in _print_object
indentation_increment)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pbxproj/PBXGenericObject.py", line 107, in _format
indentation_increment)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pbxproj/PBXObjects.py", line 42, in _print_object
result += indentation_depth + '\t{0} = {1};\n'.format(value.get_id().repr(), obj)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pbxproj/PBXKey.py", line 8, in repr
comment = self._get_comment()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pbxproj/PBXKey.py", line 20, in _get_comment
return self.get_parent()._resolve_comment(self)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pbxproj/PBXGenericObject.py", line 154, in _resolve_comment
return self[key]._get_comment()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pbxproj/pbxsections/PBXBuildFile.py", line 41, in _get_comment
comment = self.fileRef._get_comment()
AttributeError: 'unicode' object has no attribute '_get_comment'

find same issue #264