-
-
Notifications
You must be signed in to change notification settings - Fork 404
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
'list' object has no attribute 'is_python' error when initialising new project #110
Comments
The issue lies deeply in the 3rd party package, I need your assistance for debugging, can you do the following?
|
It is indeed deep in the dependencies! Activating the virtualenv containing >>> import pythonfinder
>>> finder = pythonfinder.Finder()
>>> print(list(finder.find_all_python_versions(3, 7))
... )
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/pattersonrb/.local/pipx/venvs/pdm/lib/python3.7/site-packages/pythonfinder/pythonfinder.py", line 323, in find_all_python_versions
major=major, minor=minor, patch=patch, pre=pre, dev=dev, arch=arch, name=name
File "/Users/pattersonrb/.local/pipx/venvs/pdm/lib/python3.7/site-packages/pythonfinder/models/path.py", line 548, in find_all_python_versions
values = list(self.get_pythons(sub_finder))
File "/Users/pattersonrb/.local/pipx/venvs/pdm/lib/python3.7/site-packages/pythonfinder/models/path.py", line 506, in get_pythons
pythons = [entry for entry in self._get_all_pythons(finder)]
File "/Users/pattersonrb/.local/pipx/venvs/pdm/lib/python3.7/site-packages/pythonfinder/models/path.py", line 506, in <listcomp>
pythons = [entry for entry in self._get_all_pythons(finder)]
File "/Users/pattersonrb/.local/pipx/venvs/pdm/lib/python3.7/site-packages/pythonfinder/models/path.py", line 499, in _get_all_pythons
for python in self._filter_paths(finder):
File "/Users/pattersonrb/.local/pipx/venvs/pdm/lib/python3.7/site-packages/pythonfinder/models/path.py", line 491, in _filter_paths
python_versions = finder(path)
File "/Users/pattersonrb/.local/pipx/venvs/pdm/lib/python3.7/site-packages/pythonfinder/models/python.py", line 289, in find_all_python_versions
pythons = [p for p in pythons if p and p.is_python and p.as_python is not None]
File "/Users/pattersonrb/.local/pipx/venvs/pdm/lib/python3.7/site-packages/pythonfinder/models/python.py", line 289, in <listcomp>
pythons = [p for p in pythons if p and p.is_python and p.as_python is not None]
AttributeError: 'list' object has no attribute 'is_python'
$ python3 -m pythonfinder --findall
Found python at the following locations:
3.8.2: 3.8.2 (None) @ /Users/xxx/.pyenv/versions/3.8.2/bin/python3
python3: 3.7.7 (None) @ /Users/xxx/.local/pipx/venvs/pdm/bin/python3
python3: 3.7.7 (None) @ /Users/xx/.local/pipx/venvs/pdm/bin/python3
3.7.7: 3.7.7 (None) @ /Users/xx/.pyenv/versions/3.7.7/bin/python3
python3: 3.7.3 (None) @ /usr/bin/python3
python2: 2.7.16 (None) @ /usr/bin/python2
python2.7: 2.7.16 (None) @ /usr/bin/python2.7 Which works exactly as expected. Those indeed are all the python versions on my system (user name redacted). This leads me to believe it's an issue with So it seems the issue is in |
Please do it. I am also a maintainer of |
I'll close it here, then, so there aren't duplicate issues floating around. Thanks for the help! |
@rbpatt2019 I have published a bugfix release for |
Running
pdm init
in any directory yields aAttributeError: 'list' object has no attribute 'is_python'
error.Steps to reproduce
After installing
pdm
using:Attempt to initialise a new project using the following:
Actual behavior
pdm init -v
fails with the following error, regardless of the directory or Python interpreter:Expected behavior
A new project should be initiated.
Environment Information
pdm version: 0.7.1
Additionally,
>>> pyenv versions system * 3.7.7 (set by /Users/pattersonrb/.pyenv/version) 3.8.2
Though both 3.7 and 3.8 return the error.
Super excited to see this tool develop!
The text was updated successfully, but these errors were encountered: