schwa / punic

[DEPRECATED] Clean room reimplementation of Carthage tool
0 stars 1 forks source link

Clean brew install error with `punic init` - `AttributeError: 'set' object has no attribute 'keys'` #67

Closed mmmilo closed 7 years ago

mmmilo commented 7 years ago

Call stack:

Traceback (most recent call last):
  File "/usr/local/bin/punic", line 11, in <module>
    load_entry_point('punic==0.2.9', 'console_scripts', 'punic')()
  File "/usr/local/Cellar/punic/0.2.9/libexec/lib/python2.7/site-packages/punic/punic_cli.py", line 397, in main
    punic_cli()
  File "/usr/local/Cellar/punic/0.2.9/libexec/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/Cellar/punic/0.2.9/libexec/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/Cellar/punic/0.2.9/libexec/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/Cellar/punic/0.2.9/libexec/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/Cellar/punic/0.2.9/libexec/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/Cellar/punic/0.2.9/libexec/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/Cellar/punic/0.2.9/libexec/lib/python2.7/site-packages/punic/punic_cli.py", line 341, in init
    config_init(**kwargs)
  File "/usr/local/Cellar/punic/0.2.9/libexec/lib/python2.7/site-packages/punic/config_init.py", line 74, in config_init
    xcode_version = _prompt("Xcode Version", _xcode_versions())
  File "/usr/local/Cellar/punic/0.2.9/libexec/lib/python2.7/site-packages/punic/config_init.py", line 41, in _xcode_versions
    return sorted([six.text_type(version) for version in Xcode._all_xcodes.keys()])
AttributeError: 'set' object has no attribute 'keys'

I had punic installed a while back, not sure if that makes a difference, so I uninstalled punic first, ie. pip uninstall punic.

Did a fresh install after updating/upgrading brew. Running punic init yields the following callstack. Is it a problem with my Python version (not versed in Python)? It just seems to be a problem with the object type of_all_xcodes.

Thanks!

schwa commented 7 years ago

How did you install? Are you running from a non-release branch?

mmmilo commented 7 years ago

I'm doing a straight brew install punic, which installed 0.2.9, so I don't believe so. I'm using Xcode 8.3.1 only (ie. no beta/old versions alongside).

schwa commented 7 years ago

Ah ok - that's bad. Will look into this.

schwa commented 7 years ago

OK fixed and the home-brew tap is updated as well. Can you verify with a brew update and brew upgrade punic?

mmmilo commented 7 years ago

Seems to have done the trick. Thanks!