Skip to content

"Loading .env environment variables..." and other init commands are executed twice #6328

@tobiasgardner

Description

@tobiasgardner

Might be related to this (closed) ticket: #6198

Issue description

When executing pipenv run xxx commands, environment seems to be loaded two times.

Expected result

Should only be executed one time.

Actual result

tobias@mac-mini % pipenv run prod
Loading .env environment variables...
Loading .env environment variables...
Installing dependencies from Pipfile.lock (0cb9e0)...
All dependencies are now up-to-date!
Upgrading  in  dependencies.
Building requirements...
Resolving dependencies...
✔ Success!
Building requirements...
Resolving dependencies...
✔ Success!
Installing dependencies from Pipfile.lock (0cb9e0)...
All dependencies are now up-to-date!

Steps to replicate

Provide the steps to replicate (which usually at least includes the commands and the Pipfile).


Please run $ pipenv --support, and paste the results here. Don't put backticks (`) around it! The output already contains Markdown formatting.

$ pipenv --support

Pipenv version: '2024.4.0'

Pipenv location: '/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/pipenv'

Python location: '/Library/Frameworks/Python.framework/Versions/3.13/bin/python3.13'

OS Name: 'posix'

User pip version: '24.3.1'

user Python installations found:

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.13.1',
 'os_name': 'posix',
 'platform_machine': 'arm64',
 'platform_python_implementation': 'CPython',
 'platform_release': '24.2.0',
 'platform_system': 'Darwin',
 'platform_version': 'Darwin Kernel Version 24.2.0: Fri Dec  6 19:04:03 PST '
                     '2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T8132',
 'python_full_version': '3.13.1',
 'python_version': '3.13',
 'sys_platform': 'darwin'}

System environment variables:

  • __CFBundleIdentifier
  • TMPDIR
  • XPC_FLAGS
  • LaunchInstanceID
  • TERM
  • SSH_AUTH_SOCK
  • SECURITYSESSIONID
  • XPC_SERVICE_NAME
  • TERM_PROGRAM
  • TERM_PROGRAM_VERSION
  • TERM_SESSION_ID
  • SHELL
  • HOME
  • LOGNAME
  • USER
  • PATH
  • SHLVL
  • PWD
  • OLDPWD
  • HOMEBREW_PREFIX
  • HOMEBREW_CELLAR
  • HOMEBREW_REPOSITORY
  • INFOPATH
  • NVM_DIR
  • NVM_CD_FLAGS
  • NVM_RC_VERSION
  • LC_CTYPE
  • _
  • __CF_USER_TEXT_ENCODING
  • PIP_DISABLE_PIP_VERSION_CHECK
  • PYTHONDONTWRITEBYTECODE
  • ECOMBOOSTER_DEMO_MODE
  • ECOMBOOSTER_URL_PROD
  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
  • AWS_BUCKET_NAME
  • SENTRY
  • SENDGRID_API_KEY
  • ECOMBOOSTER_COMPANY_NAME
  • ECOMBOOSTER_CUSTOMER_MEDIA_STORAGE_PATH
  • ECOMBOOSTER_USERNAME
  • ECOMBOOSTER_PASSWORD
  • EMAIL_TO_LIST
  • SCRAPER_NAME
  • SCRAPER_USERNAME
  • SCRAPER_PASSWORD
  • PYTHONFINDER_IGNORE_UNSUPPORTED

Pipenv–specific environment variables:

Debug–specific environment variables:

  • PATH: /Users/tobias/.pyenv/versions/3.12.8/bin:/Users/tobias/.pyenv/versions/3.13.1/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Library/Frameworks/Python.framework/Versions/3.13/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin
  • SHELL: /bin/zsh
  • PWD: /Users/tobias/Code/kilamobler_brafab

Contents of Pipfile ('/Users/tobias/Code/kilamobler_brafab/Pipfile'):

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

[requires]
python_version = "3.13"

[scripts]
setup = "./setup.sh"
dev_local = "./scrape.sh deploy-mode=DEV_LOCAL"
dev = "./scrape.sh deploy-mode=DEV"
prod = "./scrape.sh deploy-mode=PROD"

[packages]
"zope.interface" = "*"
attrs = "*"
automat = "*"
boto3 = "*"
botocore = "*"
certifi = "*"
cffi = "*"
charset-normalizer = "*"
constantly = "*"
cryptography = "*"
cssselect = "*"
filelock = "*"
ghostscript = "*"
httpx = "*"
hyperlink = "*"
idna = "*"
incremental = "*"
itemadapter = "*"
itemloaders = "*"
jmespath = "*"
lxml = "*"
openpyxl = "*"
packaging = "*"
parsel = "*"
pillow = "*"
protego = "*"
pyasn1 = "*"
pyasn1-modules = "*"
pycparser = "*"
pydispatcher = "*"
pyopenssl = "*"
pyparsing = "*"
python-dateutil = "*"
python-dotenv = "*"
python-http-client = "*"
python-slugify = "*"
queuelib = "*"
requests = "*"
requests-file = "*"
scrapy = "*"
scrapy-inline-requests = "*"
selenium = "*"
sendgrid = "*"
sentry-sdk = "*"
service-identity = "*"
six = "*"
starkbank-ecdsa = "*"
tldextract = "*"
twisted = "*"
typing-extensions = "*"
urllib3 = "*"
w3lib = "*"
webdriver-manager = "*"
xmltodict = "*"
bs4 = "*"
pdfplumber = "*"
furl = "*"

[dev-packages]

Contents of Pipfile.lock ('/Users/tobias/Code/kilamobler_brafab/Pipfile.lock'):

Had to remove this, post was >65k

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions