-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Generating requirements.txt using invoke produces a trailing escape character #4442
Comments
I repeated the steps and can't reproduce(on WSL). Maybe it is related to your terminal setup |
@frostming Thanks for trying. I'm running these in Pycharm as run configurations with Terminal Emulation disabled. |
When I try running in a regular terminal session, the result is as expected. I've also opened a relevant issue over here. |
Closing this since no more actions we can take with Pipenv. |
For anyone also searching for a solution: This is not a Pycharm issue; it is caused by colorama, which is included in pipenv, and behaves incorrectly when the environment variable PYCHARM_HOSTED has been set, even if the python script's output is actually redirected to a file or any other tool.
|
I've created an issue with colorama here: tartley/colorama#307 |
Issue description
When running
pipenv lock -r
using invoke (no pty), a trailing ANSI escape character (reset'\x1b[0m'
) is printed.This renders the
requirements.txt
file unparsable.I have a feeling this may be due to the way Pipenv is using click.echo
Expected result
No escape characters present
Actual result
(no additional output from
--verbose
)Steps to replicate
Chalice expects a
requirements.txt
in order to package a project and its dependencies. For this, I have addedpipenv lock -r
to an invoke task as follows:This is also reproducible by simply using subprocess too:
$ pipenv --support
Pipenv version:
'2020.6.2'
Pipenv location:
'/usr/lib/python3.8/site-packages/pipenv'
Python location:
'/usr/bin/python'
Python installations found:
3.8.5
:/home/user/.local/share/virtualenvs/project-Tah0mRfR/bin/python3
3.8.5
:/home/user/.local/share/virtualenvs/project-Tah0mRfR/bin/python3.8
3.8.5
:/home/user/.local/share/virtualenvs/project-Tah0mRfR/bin/python3
3.8.5
:/home/user/.local/share/virtualenvs/project-Tah0mRfR/bin/python3.8
3.8.5
:/usr/bin/python3
3.8.5
:/usr/bin/python3.8
3.8.5
:/bin/python3
3.8.5
:/bin/python3.8
3.7.7
:/home/mike/.pyenv/versions/3.7.7/bin/python3.7m
2.7.18
:/usr/bin/python2
2.7.18
:/usr/bin/python2.7
2.7.18
:/bin/python2
2.7.18
:/bin/python2.7
PEP 508 Information:
System environment variables:
XDG_DATA_DIRS
XDG_SEAT
XDG_SESSION_ID
HOME
GTK_MODULES
VISUAL
VIRTUAL_ENV
PAGER
LOGNAME
TERM
TMPDIR
OLDPWD
DESKTOP_SESSION
XDG_SESSION_CLASS
GDMSESSION
I3SOCK
PWD
DISPLAY
DBUS_SESSION_BUS_ADDRESS
MAIL
PATH
XDG_SESSION_DESKTOP
LESS
XDG_GREETER_DATA_DIR
SHELL
EDITOR
SHLVL
XDG_SEAT_PATH
_
GOPATH
GDK_BACKEND
TERMINAL_EMULATOR
XAUTHORITY
__INTELLIJ_COMMAND_HISTFILE__
XDG_RUNTIME_DIR
LANG
XDG_VTNR
USER
BROWSER
ZDOTDIR
XDG_SESSION_PATH
SSH_AUTH_SOCK
XDG_CURRENT_DESKTOP
XDG_SESSION_TYPE
PS1
LESS_TERMCAP_mb
LESS_TERMCAP_md
LESS_TERMCAP_me
LESS_TERMCAP_se
LESS_TERMCAP_so
LESS_TERMCAP_ue
LESS_TERMCAP_us
LS_COLORS
GREP_COLOR
GREP_COLORS
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE
PIP_DISABLE_PIP_VERSION_CHECK
PYTHONDONTWRITEBYTECODE
PIP_SHIMS_BASE_MODULE
PIP_PYTHON_PATH
PYTHONFINDER_IGNORE_UNSUPPORTED
Pipenv–specific environment variables:
Debug–specific environment variables:
PATH
:/usr/local/bin:/usr/local/sbin:/home/user/.local/share/virtualenvs/project-Tah0mRfR/bin:/home/mike/.cargo/bin:/usr/bin:/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
SHELL
:/bin/zsh
EDITOR
:nvim
LANG
:en_NZ.UTF-8
PWD
:/home/user/project
VIRTUAL_ENV
:/home/user/.local/share/virtualenvs/project-Tah0mRfR
Contents of
Pipfile
('/home/user/project/Pipfile'):Contents of
Pipfile.lock
('/home/user/project/Pipfile.lock'):The text was updated successfully, but these errors were encountered: