Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: 'productName' #54

Open
Merlini93 opened this issue Apr 3, 2020 · 3 comments
Open

KeyError: 'productName' #54

Merlini93 opened this issue Apr 3, 2020 · 3 comments

Comments

@Merlini93
Copy link

Uniquify and Sort done
Uniquify and Sort
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/bin/xunique", line 8, in
sys.exit(main())
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/xUnique.py", line 546, in main
xunique.unique_project()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/xUnique.py", line 188, in unique_project
self.__unique_project(self.root_hex)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/xUnique.py", line 365, in __unique_project
self.__set_to_result(project_hex, target_hex, cur_path_key)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/xUnique.py", line 141, in __set_to_result
current_path = '/'.join([str(current_node[i]) for i in current_path_key])
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/xUnique.py", line 141, in
current_path = '/'.join([str(current_node[i]) for i in current_path_key])
KeyError: 'productName'

@truebit
Copy link
Owner

truebit commented Apr 26, 2020

it seems your project has no productName?

@dnicolson
Copy link

The PBXAggregateTarget section appears to contain objects with a name and optionally a productName. If a PBXAggregateTarget object omits the productName key the error occurs, I found an example in the SwiftCoroutines project.

@truebit
Copy link
Owner

truebit commented May 18, 2021

this issue has already been mentioned in PR #49 , but this change would break the project file.
Using the SwiftCoroutines project mentioned above, xunique it with the PR twice, the project file breaks.
Commands below:

xunique -v SwiftCoroutines/ios/Pods/Pods.xcodeproj

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants