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

Broken pipe when running yes command in Shell #2753

Open
stav opened this Issue Aug 19, 2018 · 3 comments

Comments

Projects
None yet
3 participants
@stav

stav commented Aug 19, 2018

Issue description

When running inside a pipenv Shell some commands report a broken pipe error for standard out. This doesn't happen outside the Shell and does not happen in regular virtual environments.

Expected result

Command output to standard out

Actual result

Command output to standard out as well as the message: yes: standard output: Broken pipe

Steps to replicate
$ pipenv shell --three
Creating a virtualenv for this project...
Pipfile: /tmp/pipe.envy/Pipfile
Using /usr/bin/python3 (3.6.3) to create virtualenv...
⠋Running virtualenv with interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /home/stav/.virtualenvs/pipe.envy-t2atJ9LH/bin/python3
Also creating executable in /home/stav/.virtualenvs/pipe.envy-t2atJ9LH/bin/python
Installing setuptools, pip, wheel...done.
Setting project for pipe.envy-t2atJ9LH to /tmp/pipe.envy
Virtualenv location: /home/stav/.virtualenvs/pipe.envy-t2atJ9LH
Warning: Your Pipfile requires python_version 2.7, but you are using 3.6.3 (/home/stav/./p/bin/python).
  $ pipenv check will surely fail.
Launching subshell in virtual environment…
 . /home/stav/.virtualenvs/pipe.envy-t2atJ9LH/bin/activate
$  . /home/stav/.virtualenvs/pipe.envy-t2atJ9LH/bin/activate

❲p❳envy-t2atJ9LH$ repeat -
----------
yes: standard output: Broken pipe

tl;dr To see just the errors search this page for "Broken pipe"

$ repeat -
----------


$ mkvirtualenv envy
Running virtualenv with interpreter /usr/bin/python2
New python executable in /home/stav/.virtualenvs/envy/bin/python2
Also creating executable in /home/stav/.virtualenvs/envy/bin/python
Installing setuptools, pkg_resources, pip, wheel...done.


❲p❳envy$ repeat -
----------


❲p❳envy$ deactivate


$ repeat -
----------


$ rmvirtualenv envy
Removing envy...


$ mkvirtualenv envy -p /usr/bin/python3
Already using interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /home/stav/.virtualenvs/envy/bin/python3
Also creating executable in /home/stav/.virtualenvs/envy/bin/python
Installing setuptools, pkg_resources, pip, wheel...done.


❲p❳envy$ repeat -
----------


❲p❳envy$ deactivate


$ rmvirtualenv envy
Removing envy...


$ repeat -
----------


$ pipenv --version
pipenv, version 2018.7.1


$ pipenv shell
Creating a virtualenv for this project...
Pipfile: /tmp/pipe.envy/Pipfile
Using /usr/bin/python (2.7.14) to create virtualenv...
⠋Already using interpreter /usr/bin/python
New python executable in /home/stav/.virtualenvs/pipe.envy-t2atJ9LH/bin/python
Installing setuptools, pip, wheel...done.
Setting project for pipe.envy-t2atJ9LH to /tmp/pipe.envy
Virtualenv location: /home/stav/.virtualenvs/pipe.envy-t2atJ9LH
Creating a Pipfile for this project...
Launching subshell in virtual environment…
 . /home/stav/.virtualenvs/pipe.envy-t2atJ9LH/bin/activate
$  . /home/stav/.virtualenvs/pipe.envy-t2atJ9LH/bin/activate


❲p❳envy-t2atJ9LH$ repeat -
----------
yes: standard output: Broken pipe


❲p❳envy-t2atJ9LH$ exit


$ pipenv shell --three
Virtualenv already exists!
Removing existing virtualenv...
Creating a virtualenv for this project...
Pipfile: /tmp/pipe.envy/Pipfile
Using /usr/bin/python3 (3.6.3) to create virtualenv...
⠋Running virtualenv with interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /home/stav/.virtualenvs/pipe.envy-t2atJ9LH/bin/python3
Also creating executable in /home/stav/.virtualenvs/pipe.envy-t2atJ9LH/bin/python
Installing setuptools, pip, wheel...done.
Setting project for pipe.envy-t2atJ9LH to /tmp/pipe.envy
Virtualenv location: /home/stav/.virtualenvs/pipe.envy-t2atJ9LH
Warning: Your Pipfile requires python_version 2.7, but you are using 3.6.3 (/home/stav/./p/bin/python).
  $ pipenv check will surely fail.
Launching subshell in virtual environment…
 . /home/stav/.virtualenvs/pipe.envy-t2atJ9LH/bin/activate
$  . /home/stav/.virtualenvs/pipe.envy-t2atJ9LH/bin/activate


❲p❳envy-t2atJ9LH$ repeat -
----------
yes: standard output: Broken pipe


❲p❳envy-t2atJ9LH$ yes | sed 9q
y
y
y
y
y
y
y
y
y
yes: standard output: Broken pipe


❲p❳envy-t2atJ9LH$ exit


$ repeat -
----------


$ yes | sed 9q
y
y
y
y
y
y
y
y
y

$ pipenv --support

Pipenv version: '2018.7.1'

Pipenv location: '/home/stav/.local/lib/python2.7/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

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

  • 3.6: /usr/bin/python3.6

  • 2.7.14: /usr/bin/python

  • 2.7.14: /usr/bin/python2

  • 3.6.3: /usr/bin/python3

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '0',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '4.13.0-46-generic',
 'platform_system': 'Linux',
 'platform_version': '#51-Ubuntu SMP Tue Jun 12 12:36:29 UTC 2018',
 'python_full_version': '2.7.14',
 'python_version': '2.7',
 'sys_platform': 'linux2'}

System environment variables:

  • LC_NUMERIC
  • AUTOFEATURE
  • PROJECT_HOME
  • QT4_IM_MODULE
  • LESSOPEN
  • GTK_IM_MODULE
  • WINDOWPATH
  • XDG_CURRENT_DESKTOP
  • XDG_VTNR
  • QT_IM_MODULE
  • LOGNAME
  • USER
  • PATH
  • LC_PAPER
  • HOME
  • VIRTUALENVWRAPPER_SCRIPT
  • DISPLAY
  • SSH_AGENT_PID
  • LANG
  • PAPERSIZE
  • TERM
  • SHELL
  • XAUTHORITY
  • JOURNAL_STREAM
  • SESSION_MANAGER
  • LC_MEASUREMENT
  • MANDATORY_PATH
  • QT_ACCESSIBILITY
  • SCM_CHECK
  • GIT_HOSTING
  • GNOME_DESKTOP_SESSION_ID
  • CLUTTER_IM_MODULE
  • TEXTDOMAIN
  • DESKTOP_AUTOSTART_ID
  • XMODIFIERS
  • _VIRTUALENVWRAPPER_API
  • GREP_COLOR
  • BASH_IT
  • USERNAME
  • WORKON_HOME
  • SHLVL
  • XDG_RUNTIME_DIR
  • PS1
  • LC_IDENTIFICATION
  • LC_ADDRESS
  • HISTSIZE
  • SSH_AUTH_SOCK
  • VTE_VERSION
  • GDMSESSION
  • IM_CONFIG_PHASE
  • LC_TIME
  • TEXTDOMAINDIR
  • GNOME_SHELL_SESSION_MODE
  • PYTHONDONTWRITEBYTECODE
  • BASH_IT_THEME
  • XDG_CONFIG_DIRS
  • PIP_PYTHON_PATH
  • LANGUAGE
  • XDG_SESSION_ID
  • DBUS_SESSION_BUS_ADDRESS
  • _
  • DEFAULTS_PATH
  • HISTIGNORE
  • VIRTUALENVWRAPPER_PROJECT_FILENAME
  • DESKTOP_SESSION
  • LSCOLORS
  • LESSCLOSE
  • VIRTUALENVWRAPPER_HOOK_DIR
  • WINDOWID
  • XDG_SESSION_TYPE
  • IRC_CLIENT
  • OLDPWD
  • LC_TELEPHONE
  • GTK_MODULES
  • HISTCONTROL
  • LC_MONETARY
  • PWD
  • COLORTERM
  • LC_NAME
  • XDG_MENU_PREFIX
  • XDG_SESSION_DESKTOP
  • LS_COLORS
  • XDG_DATA_DIRS
  • XDG_SEAT

Pipenv–specific environment variables:

Debug–specific environment variables:

  • PATH: /home/stav/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
  • SHELL: /bin/bash
  • LANG: en_US.UTF-8
  • PWD: /tmp/pipe.envy

Contents of Pipfile ('/tmp/pipe.envy/Pipfile'):

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

[dev-packages]

[packages]

[requires]
python_version = "2.7"
@techalchemy

This comment has been minimized.

Show comment
Hide comment
@techalchemy

techalchemy Aug 19, 2018

Member

I am guessing this will be fixed when we update shellingham but /cc @uranusjr as he may have some other ideas about what's going on?

Member

techalchemy commented Aug 19, 2018

I am guessing this will be fixed when we update shellingham but /cc @uranusjr as he may have some other ideas about what's going on?

@uranusjr

This comment has been minimized.

Show comment
Hide comment
@uranusjr

uranusjr Aug 21, 2018

Member

This looks like the compat shell so I’m not sure, I didn’t really modify anything there. What is the OS? Linux?

Member

uranusjr commented Aug 21, 2018

This looks like the compat shell so I’m not sure, I didn’t really modify anything there. What is the OS? Linux?

@stav

This comment has been minimized.

Show comment
Hide comment
@stav

stav Aug 21, 2018

 'platform_system': 'Linux',

stav commented Aug 21, 2018

 'platform_system': 'Linux',
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment