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

PEX can't format an exception #220

Closed
direvius opened this issue Mar 15, 2016 · 1 comment
Closed

PEX can't format an exception #220

direvius opened this issue Mar 15, 2016 · 1 comment

Comments

@direvius
Copy link

If there are non-string values self._distributions this line does not work:

direvius@debuild-trusty:~/robe/yandex-tank$ pex -f wheelhouse/ yandextank -c yandex.tank -o yandex-tank.pex
Traceback (most recent call last):
  File "/usr/local/bin/pex", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/pex/bin/pex.py", line 509, in main
    pex_builder = build_pex(reqs, options, resolver_options_builder)
  File "/usr/local/lib/python2.7/dist-packages/pex/bin/pex.py", line 486, in build_pex
    pex_builder.set_script(options.script)
  File "/usr/local/lib/python2.7/dist-packages/pex/pex_builder.py", line 214, in set_script
    script, ', '.join(self._distributions)))
TypeError: sequence item 0: expected string, DistInfoDistribution found

The solution is to convert them into strings before joining:

', '.join(str(d) for d in self._distributions)
kwlzn added a commit to kwlzn/pex that referenced this issue Mar 15, 2016
kwlzn added a commit that referenced this issue Mar 16, 2016
@kwlzn
Copy link
Contributor

kwlzn commented Mar 16, 2016

thanks for the bug report! this should be fixed in master and will go out with the 1.1.5 pex release.

@kwlzn kwlzn closed this as completed Mar 16, 2016
@jsirois jsirois mentioned this issue Apr 21, 2016
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

2 participants