Closed direvius closed 8 years ago
If there are non-string values self._distributions this line does not work:
self._distributions
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)
thanks for the bug report! this should be fixed in master and will go out with the 1.1.5 pex release.
If there are non-string values
self._distributions
this line does not work:The solution is to convert them into strings before joining: