-
-
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
ResourceWarning: unclosed file #6151
Comments
Could you solve the problem? |
second to this |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
diagnose documentation
I run into the following warning when I run
pipenv install -r requirements.txt
:/home/hibuna/test/test-env/lib/python3.11/site-packages/pipenv/patched/pip/_vendor/urllib3/_collections.py:189: ResourceWarning: unclosed file <_io.FileIO name='/tmp/tmplaglsvs4' mode='rb+' closefd=True>
along with a few others....
The above happened when I:
pipenv install flask
pipenv requirements > requirements.txt
pipenv install -r requirements.txt
.This also applies when making the
requirements.txt
withpipenv run pip freeze > requirements.txt
.I get similar error(s) when trying it with a different packages, the file where the error appears is always some
/home/hibuna/test/test-env/lib/python3.11/site-packages/pipenv/...
My setup is a WSL debian 12 (bookworm).
cat /etc/wsl.conf
>>When logged in as regular user with sudo:
sudo apt update
sudo apt upgrade
sudo apt install python3 python3-pip
mkdir test && cd test
python3 -m venv test-env
source test-env/bin/activate
pip install pipenv
then the above commands.
It doesn't seem to break anything so far.
Provide the steps to replicate (which usually at least includes the commands and the Pipfile).
$ pipenv --support
Pipenv version:
'2023.12.1'
Pipenv location:
'/home/hibuna/test/testttt/test-env/lib/python3.11/site-packages/pipenv'
Python location:
'/home/hibuna/test/testttt/test-env/bin/python3'
OS Name:
'posix'
User pip version:
'23.3.2'
user Python installations found:
PEP 508 Information:
System environment variables:
SHELL
WSL2_GUI_APPS_ENABLED
WSL_DISTRO_NAME
LANGUAGE
NAME
PWD
LOGNAME
HOME
LANG
WSL_INTEROP
LS_COLORS
VIRTUAL_ENV
WAYLAND_DISPLAY
TERM
USER
DISPLAY
SHLVL
VIRTUAL_ENV_PROMPT
XDG_RUNTIME_DIR
PS1
WSLENV
LC_ALL
PATH
MAIL
HOSTTYPE
PULSE_SERVER
OLDPWD
_
PIP_DISABLE_PIP_VERSION_CHECK
PYTHONDONTWRITEBYTECODE
PYTHONFINDER_IGNORE_UNSUPPORTED
Pipenv–specific environment variables:
Debug–specific environment variables:
PATH
:/home/hibuna/test/testttt/test-env/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib
SHELL
:/bin/bash
LANG
:en_US.UTF-8
PWD
:/home/hibuna/test/testttt
VIRTUAL_ENV
:/home/hibuna/test/testttt/test-env
Contents of
Pipfile
('/home/hibuna/test/testttt/Pipfile'):Contents of
Pipfile.lock
('/home/hibuna/test/testttt/Pipfile.lock'):The text was updated successfully, but these errors were encountered: