Skip to content

NoInterpreterInfo confused as missing version #165

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

Closed
pytoxbot opened this issue Sep 17, 2016 · 2 comments
Closed

NoInterpreterInfo confused as missing version #165

pytoxbot opened this issue Sep 17, 2016 · 2 comments
Labels
area:reporting bug:minor does not affect many people or has no big impact level:medium rought estimate that this might be neither easy nor hard to implement

Comments

@pytoxbot
Copy link

If have PYTHONPATH set, tests for py34 fail with an error indicating that 2.5 is not a supported version.

Had to drop into a debug session to figure this one out. Relevant code snippet below.

 181         def getsupportedinterpreter(self):
 182             import pdb; pdb.set_trace()
 183             if sys.platform == "win32" and self.basepython and \
 184                     "jython" in self.basepython:
 185                 raise tox.exception.UnsupportedInterpreter(
 186                     "Jython/Windows does not support installing scripts")
 187             info = self.config.interpreters.get_info(self.basepython)
 188             if not info.executable:
 189                 raise tox.exception.InterpreterNotFound(self.basepython)
 190             if info.version_info < (2,6):
 191  ->             raise tox.exception.UnsupportedInterpreter(
 192                     "python2.5 is not supported anymore, sorry")
 193             return info.executable
(Pdb++) info
<tox.interpreters.NoInterpreterInfo instance at 0x100ca0f38>
(Pdb++) pp info.__dict__
{'err': 'Failed to import the site module\nYour PYTHONPATH points to a site-packages dir for Python 2.x but you are running Python 3.x!\n     PYTHONPATH is currently: "/usr/local/lib/python2.7/site-packages:"\n     You should `unset PYTHONPATH` to fix this.\n',
 'executable': local('/usr/local/bin/python3.4'),
 'name': 'python3.4',
 'out': '',
 'version_info': None}
@obestwalter
Copy link
Member

If the error is still obfuscated like this today that should definitely be fixed. Did not try to reproduce it yet though.

@obestwalter obestwalter added needs:discussion It's not quite clear if and how this should be done bug labels Dec 21, 2016
@obestwalter
Copy link
Member

obestwalter commented Feb 17, 2017

PYTHONPATH is explicitly being removed since v2.4.0 so this usage pattern is basically invalid now and the suggestion would be not to use PYTHOPATH (unless we add at as opt in as discussed in #457 atm).

Leaving this open though because I saw confusing error messages around this in other contexts as well, so this needs definitely improving.

@obestwalter obestwalter removed the needs:discussion It's not quite clear if and how this should be done label Feb 17, 2017
@obestwalter obestwalter added area:reporting level:medium rought estimate that this might be neither easy nor hard to implement bug:minor does not affect many people or has no big impact and removed bug labels Sep 4, 2017
@tox-dev tox-dev locked and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area:reporting bug:minor does not affect many people or has no big impact level:medium rought estimate that this might be neither easy nor hard to implement
Projects
None yet
Development

No branches or pull requests

3 participants