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

pipenv install --dev ansible-test fails to create lock file #2936

Closed
claudeleveille opened this issue Oct 7, 2018 · 6 comments
Closed

pipenv install --dev ansible-test fails to create lock file #2936

claudeleveille opened this issue Oct 7, 2018 · 6 comments

Comments

@claudeleveille
Copy link

claudeleveille commented Oct 7, 2018

Issue description

pipenv fails to produce a lock file when installing the 'ansible-test' package.

Expected result

pipenv command exits with a zero status code and both Pipfile and Pipfile.lock are produced on the filesystem.

Actual result

Command output:

$ pipenv install --dev ansible-test --verbose
Installing ansible-test...
⠋Installing 'ansible-test'
$ "/home/claude/.local/share/virtualenvs/ansible-role-base-yifMWX3P/bin/pip" install   --verbose    "ansible-test" -i https://pypi.org/sim
ple --exists-action w
Created temporary directory: /tmp/pip-ephem-wheel-cache-gprwi7i2
Created temporary directory: /tmp/pip-req-tracker-hsdk8w3h
Created requirements tracker '/tmp/pip-req-tracker-hsdk8w3h'
Created temporary directory: /tmp/pip-install-300pjjev
Requirement already satisfied: ansible-test in /home/claude/.local/share/virtualenvs/ansible-role-base-yifMWX3P/lib/python3.6/site-package
s (1.0.1)
Requirement already satisfied: Jinja2 in /home/claude/.local/share/virtualenvs/ansible-role-base-yifMWX3P/lib/python3.6/site-packages (fro
m ansible-test) (2.10)
Requirement already satisfied: MarkupSafe>=0.23 in /home/claude/.local/share/virtualenvs/ansible-role-base-yifMWX3P/lib/python3.6/site-pac
kages (from Jinja2->ansible-test) (1.0)
Cleaning up...
Removed build tracker '/tmp/pip-req-tracker-hsdk8w3h'

Adding ansible-test to Pipfile's [dev-packages]...
Pipfile.lock not found, creating...
Locking [dev-packages] dependencies...
using sources: [{'url': 'https://pypi.org/simple', 'verify_ssl': True, 'name': 'pypi'}]

Traceback (most recent call last):
  File "/home/claude/.local/lib/python3.6/site-packages/pipenv/resolver.py", line 87, in <module>
    main()
  File "/home/claude/.local/lib/python3.6/site-packages/pipenv/resolver.py", line 76, in main
    system=system,
  File "/home/claude/.local/lib/python3.6/site-packages/pipenv/resolver.py", line 63, in resolve
    allow_global=system,
  File "/home/claude/.local/lib/python3.6/site-packages/pipenv/utils.py", line 402, in resolve_deps
    req_dir=req_dir
  File "/home/claude/.local/lib/python3.6/site-packages/pipenv/utils.py", line 250, in actually_resolve_deps
    req = Requirement.from_line(dep)
  File "/home/claude/.local/lib/python3.6/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 704, in from_line
    line, extras = _strip_extras(line)
TypeError: 'module' object is not callable

pipenv lock --clear --verbose didn't fix it:

$ pipenv lock --clear --verbose
Locking [dev-packages] dependencies...
using sources: [{'url': 'https://pypi.org/simple', 'verify_ssl': True, 'name': 'pypi'}]

Traceback (most recent call last):
  File "/home/claude/.local/lib/python3.6/site-packages/pipenv/resolver.py", line 87, in <module>
    main()
  File "/home/claude/.local/lib/python3.6/site-packages/pipenv/resolver.py", line 76, in main
    system=system,
  File "/home/claude/.local/lib/python3.6/site-packages/pipenv/resolver.py", line 63, in resolve
    allow_global=system,
  File "/home/claude/.local/lib/python3.6/site-packages/pipenv/utils.py", line 402, in resolve_deps
    req_dir=req_dir
  File "/home/claude/.local/lib/python3.6/site-packages/pipenv/utils.py", line 250, in actually_resolve_deps
    req = Requirement.from_line(dep)
  File "/home/claude/.local/lib/python3.6/site-packages/pipenv/vendor/requirementslib/models/requirements.py", line 704, in from_line
    line, extras = _strip_extras(line)
TypeError: 'module' object is not callable

Steps to replicate

  1. pipenv install --dev ansible-test (version 1.0.1, specifying version doesn't help).

My Pipfile (results from running above command):

[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]

[dev-packages]
ansible-test = "*"

[requires]
python_version = "3.6"

$ pipenv --support

Pipenv version: '2018.7.1'

Pipenv location: '/home/claude/.local/lib/python3.6/site-packages/pipenv'

Python location: '/usr/bin/python3'

Other Python installations in PATH:

  • 2.7: /usr/bin/python2.7

  • 2.7: /usr/bin/python2.7

  • 3.6: /usr/bin/python3.6m

  • 3.6: /usr/bin/python3.6

  • 2.7.15: /usr/bin/python

  • 2.7.15: /usr/bin/python2

  • 3.6.6: /usr/bin/python3

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.6.6',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '4.15.0-36-generic',
 'platform_system': 'Linux',
 'platform_version': '#39-Ubuntu SMP Mon Sep 24 16:19:09 UTC 2018',
 'python_full_version': '3.6.6',
 'python_version': '3.6',
 'sys_platform': 'linux'}

System environment variables:

  • CLUTTER_IM_MODULE
  • LS_COLORS
  • LESSCLOSE
  • XDG_MENU_PREFIX
  • LANG
  • DISPLAY
  • GNOME_SHELL_SESSION_MODE
  • USERNAME
  • CHROME_DESKTOP
  • XDG_VTNR
  • GIO_LAUNCHED_DESKTOP_FILE_PID
  • SSH_AUTH_SOCK
  • XDG_SESSION_ID
  • USER
  • DESKTOP_SESSION
  • QT4_IM_MODULE
  • TEXTDOMAINDIR
  • WAYLAND_DISPLAY
  • PWD
  • HOME
  • TEXTDOMAIN
  • TERM_PROGRAM
  • TERM_PROGRAM_VERSION
  • XDG_SESSION_TYPE
  • XDG_DATA_DIRS
  • XDG_SESSION_DESKTOP
  • GJS_DEBUG_OUTPUT
  • DESKTOP_STARTUP_ID
  • TERM
  • SHELL
  • QT_IM_MODULE
  • XMODIFIERS
  • IM_CONFIG_PHASE
  • XDG_CURRENT_DESKTOP
  • GIO_LAUNCHED_DESKTOP_FILE
  • SHLVL
  • XDG_SEAT
  • LANGUAGE
  • GDMSESSION
  • GNOME_DESKTOP_SESSION_ID
  • LOGNAME
  • DBUS_SESSION_BUS_ADDRESS
  • XDG_RUNTIME_DIR
  • XDG_CONFIG_DIRS
  • PATH
  • GJS_DEBUG_TOPICS
  • SESSION_MANAGER
  • LESSOPEN
  • GTK_IM_MODULE
  • OLDPWD
  • _
  • PYTHONDONTWRITEBYTECODE
  • PIP_PYTHON_PATH

Pipenv–specific environment variables:

Debug–specific environment variables:

  • PATH: /home/claude/.local/bin:/home/claude/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/claude/go/bin:~/.local/bin:/home/claude/go/bin:~/.local/bin
  • SHELL: /bin/bash
  • LANG: en_US.UTF-8
  • PWD: /home/claude/code/ansible-role-base

Contents of Pipfile ('/home/claude/code/ansible-role-base/Pipfile'):

[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]

[dev-packages]
ansible-test = "*"

[requires]
python_version = "3.6"
@claudeleveille
Copy link
Author

Seems to be doing this same thing for every package now... Maybe it's my system.

@techalchemy
Copy link
Member

Most likely you will need the changes is #2935 to see this work

@ghost
Copy link

ghost commented Oct 8, 2018

@claude-leveille it's not your system, pipenv is broken atm

current master works as expected

@claudeleveille
Copy link
Author

Yeah it started failing for every new project in my CI pipelines. Curiously, my existing project still builds fine even though it uses packages that I was trying to download in new projects. Maybe because the lock file already existed for the projects prior to the failure.

@claudeleveille
Copy link
Author

I still get the TypeError even after upgrading to 2018.10.9.

@claudeleveille
Copy link
Author

It seems to be working like normal again, just... like that. Version 2018.10.9. Well, seems like this wasn't ONLY pipenv's fault. Given it's now resolved, I'll close this issue.

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