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 --completion throws jinja2.exception.TemplateNotFound: zsh.j2 #2472

Closed
nils-van-zuijlen opened this issue Jun 29, 2018 · 2 comments
Closed
Labels
Type: Duplicate This issue is a duplicate of an already-existing issue.

Comments

@nils-van-zuijlen
Copy link

Traceback (most recent call last):
  File "/usr/bin/pipenv", line 11, in <module>
    load_entry_point('pipenv==2018.6.25', 'console_scripts', 'pipenv')()
  File "/usr/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1043, in invoke
    return Command.invoke(self, ctx)
  File "/usr/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/pipenv/vendor/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/pipenv/cli.py", line 178, in cli
    print(click_completion.get_code(shell=shell, prog_name='pipenv'))
  File "/usr/lib/python3.6/site-packages/pipenv/vendor/click_completion/__init__.py", line 353, in get_code
    template = env.get_template('%s.j2' % shell)
  File "/usr/lib/python3.6/site-packages/pipenv/vendor/jinja2/environment.py", line 830, in get_template
    return self._load_template(name, self.make_globals(globals))
  File "/usr/lib/python3.6/site-packages/pipenv/vendor/jinja2/environment.py", line 804, in _load_template
    template = self.loader.load(self, name, globals)
  File "/usr/lib/python3.6/site-packages/pipenv/vendor/jinja2/loaders.py", line 113, in load
    source, filename, uptodate = self.get_source(environment, name)
  File "/usr/lib/python3.6/site-packages/pipenv/vendor/jinja2/loaders.py", line 187, in get_source
    raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: zsh.j2
$ python -m pipenv.help output

Pipenv version: '2018.6.25'

Pipenv location: '/usr/lib/python3.6/site-packages/pipenv'

Python location: '/usr/bin/python'

Other Python installations in PATH:

  • 2.7: /usr/bin/python2.7

  • 2.7: /usr/bin/python2.7

  • 2.7: /bin/python2.7

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

  • 3.6: /usr/bin/python3.6

  • 3.6: /bin/python3.6

  • 3.6.5: /usr/bin/python

  • 3.6.5: /bin/python

  • 2.7.15: /usr/bin/python2

  • 2.7.15: /bin/python2

  • 3.6.5: /usr/bin/python3

  • 3.6.5: /bin/python3

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.6.5',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '4.17.2-1-ARCH',
 'platform_system': 'Linux',
 'platform_version': '#1 SMP PREEMPT Sat Jun 16 11:08:59 UTC 2018',
 'python_full_version': '3.6.5',
 'python_version': '3.6',
 'sys_platform': 'linux'}

System environment variables:

  • XDG_SEAT_PATH
  • XDG_CONFIG_DIRS
  • LANG
  • SHLVL
  • XDG_VTNR
  • LOGNAME
  • PWD
  • DISPLAY
  • MOZ_PLUGIN_PATH
  • XDG_GREETER_DATA_DIR
  • XAUTHORITY
  • COLORTERM
  • XDG_SESSION_ID
  • DESKTOP_SESSION
  • XDG_SESSION_DESKTOP
  • GDMSESSION
  • SESSION_MANAGER
  • DBUS_SESSION_BUS_ADDRESS
  • VTE_VERSION
  • MAIL
  • XDG_DATA_DIRS
  • _
  • XDG_MENU_PREFIX
  • GLADE_MODULE_PATH
  • SHELL
  • XDG_SESSION_TYPE
  • WINDOWID
  • SSH_AGENT_PID
  • GTK_MODULES
  • XDG_CURRENT_DESKTOP
  • GLADE_CATALOG_PATH
  • PATH
  • SSH_AUTH_SOCK
  • TERM
  • HOME
  • XDG_SEAT
  • GLADE_PIXMAP_PATH
  • XDG_RUNTIME_DIR
  • XDG_SESSION_PATH
  • USER
  • OLDPWD
  • HISTFILE
  • HISTSIZE
  • SAVEHIST
  • HOSTNAME
  • LS_COLORS
  • EDITOR
  • color
  • PR_RED
  • PR_LIGHT_RED
  • count
  • PR_GREEN
  • PR_LIGHT_GREEN
  • PR_YELLOW
  • PR_LIGHT_YELLOW
  • PR_BLUE
  • PR_LIGHT_BLUE
  • PR_MAGENTA
  • PR_LIGHT_MAGENTA
  • PR_CYAN
  • PR_LIGHT_CYAN
  • PR_WHITE
  • PR_LIGHT_WHITE
  • PR_NO_COLOR
  • PS1
  • RPS1
  • PYTHONDONTWRITEBYTECODE
  • PIP_PYTHON_PATH

Pipenv–specific environment variables:

Debug–specific environment variables:

  • PATH: /usr/local/bin:/usr/local/sbin/:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
  • SHELL: /usr/bin/zsh
  • EDITOR: nano
  • LANG: fr_FR.UTF-8
  • PWD: /home/nils


Steps to replicate
  • Use the Archlinux community/python-pipenv package to get pipenv installed.
  • Use zsh to run pipenv --completion.
  • You should get the error traceback in stderr.
@uranusjr uranusjr added the Type: Duplicate This issue is a duplicate of an already-existing issue. label Jun 29, 2018
@nils-van-zuijlen
Copy link
Author

@uranusjr Please tell where is the "original", I didn't find it.

@daogilvie
Copy link

daogilvie commented Jun 29, 2018

@nils-van-zuijlen Issues not immediately obvious as none of them remain open at this time. See #2422, along with https://github.com/pypa/pipenv/issues?utf8=%E2%9C%93&q=templateNotFound

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Duplicate This issue is a duplicate of an already-existing issue.
Projects
None yet
Development

No branches or pull requests

3 participants