truebit / xUnique

merge Xcode project file is so easy
https://fclef.wordpress.com
Other
1.5k stars 118 forks source link

AttributeError: 'NoneType' object has no attribute 'group' #6

Closed truebit closed 10 years ago

truebit commented 10 years ago
Traceback (most recent call last):
  File "/Users/seanwang/Documents/work/Dev/xUnique/xUnique.py", line 486, in <module>
    main(sys_argv)
  File "/Users/seanwang/Documents/work/Dev/xUnique/xUnique.py", line 468, in main
    xunique.sort_pbxproj(options.sort_pbx_fn_bool)
  File "/Users/seanwang/Documents/work/Dev/xUnique/xUnique.py", line 302, in sort_pbxproj
    lines.sort(key=lambda file_str: pbx_key_ptn.search(file_str).group(1))
  File "/Users/seanwang/Documents/work/Dev/xUnique/xUnique.py", line 302, in <lambda>
    lines.sort(key=lambda file_str: pbx_key_ptn.search(file_str).group(1))
AttributeError: 'NoneType' object has no attribute 'group'

When trying to xUnique project file in webkit

evan0502 commented 8 years ago

I got the same problem. image

truebit commented 8 years ago

@evan0502 could you provide your project.xcodeproj file?

evan0502 commented 8 years ago

@truebit https://pan.baidu.com/s/1bpMIEM7 .

truebit commented 8 years ago

@evan0502 Xcode project file would indent with white spaces after /* Begin PBX??? section */ line. But your project file removed all the indent based white spaces in line beginning.

That's the root cause. You need to revert the white spaces you removed