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

1.1.17 throws AttributeError with --disable-cache #260

Closed
wayne-luminal opened this issue May 23, 2016 · 6 comments
Closed

1.1.17 throws AttributeError with --disable-cache #260

wayne-luminal opened this issue May 23, 2016 · 6 comments
Assignees
Labels

Comments

@wayne-luminal
Copy link

Our build system runs pex and throws the following stack trace. I've confirmed I don't see this with 1.1.16.

Traceback (most recent call last):
  File ".tox/package/bin/pex", line 11, in <module>
    sys.exit(main())
  File ".../lib/python3.4/site-packages/pex/bin/pex.py", line 533, in main
    options.cache_dir = make_relative_to_root(options.cache_dir)
  File ".../.tox/package/lib/python3.4/site-packages/pex/bin/pex.py", line 514, in make_relative_to_root
    return os.path.normpath(path.format(pex_root=ENV.PEX_ROOT))
AttributeError: 'list' object has no attribute 'format'

With the additional message

ERROR: InvocationError: 'pex . -o dist/component.pex -c component --disable-cache -v -i <url>'
@kwlzn
Copy link
Contributor

kwlzn commented May 23, 2016

@wayne-luminal thanks for the bug report and apologies for the breakage. we'll get this fixed up asap.

@digwanderlust looks like this was related to your change that just went out in 1.1.7. mind taking a look?

@kwlzn
Copy link
Contributor

kwlzn commented May 23, 2016

fwiw, it seems the use of --disable-cache is the bit that causes this - hence why this wasn't revealed in the basic smoke testing that happens as part of releases.

we should add some automated test coverage for this flag in particular.

@kwlzn kwlzn changed the title 1.1.17 throws AttributeError 1.1.17 throws AttributeError with --disable-cache May 23, 2016
@digwanderlust
Copy link
Contributor

For some readon disable cache sets the cache dir to [], I'll add a test and fix this.

digwanderlust added a commit to digwanderlust/pex that referenced this issue May 23, 2016
Fix a bug introduced with --pex-root that raised an exception on
when --disable-cache was used.
@digwanderlust
Copy link
Contributor

Fix is up at: #261

kwlzn pushed a commit that referenced this issue May 23, 2016
Fixes a bug introduced with --pex-root that raised an exception on when --disable-cache was used.
@kwlzn kwlzn mentioned this issue May 23, 2016
@kwlzn
Copy link
Contributor

kwlzn commented May 23, 2016

this should be fixed in 1.1.8 - now available on pypi: https://pypi.python.org/pypi/pex/1.1.8

verified I can no longer reproduce the breakage using this release. closing.

@kwlzn kwlzn closed this as completed May 23, 2016
@wayne-luminal
Copy link
Author

👍 Thank you!

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

No branches or pull requests

3 participants