theskumar / theskumar/python-dotenv
Bug: python-dotenv doesn't load 1Password “mounted” .env files (looks like a FIFO / fd-backed file)
Personne n'a encore pris cette issue.
- Langage dominant
- Python
- Étoiles
- 8.9k
- Forks
- 581
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
I’ve been trying 1Password’s new environment feature which mounts a .env file to a destination path (I think it’s a pipe, file descriptor path, or some other non-regular file). This seems to be a Mac feature right now.
python-dotenv doesn’t seem to load anything from it, even though the path exists.
What I expected
load_dotenv() (or dotenv_values()) should read key/value pairs from the mounted .env file, same as a normal file. I'd expect something similar to Node's dotenv package, that when the file tries to be read, 1Password prompts you to allow access. Only then are the values available
What happened instead
The file path exists, but reading it gives an empty string (and python-dotenv ends up loading nothing).
Quick sanity check:
from pathlib import Path
p = Path(".env")
print("exists:", p.exists())
print("readable:", p.read_text(errors="replace"))
Output:
exists: True
readable:
Repro steps
- Use 1Password to mount / expose a
.envfile (however their new environment feature does it). - Point the app at that
.envpath (eg in the project root as.env). - Call
load_dotenv()ordotenv_values(). - Observe that nothing is loaded.
Versions
- OS: macOS 15.6
- Python: 3.13
python-dotenv: 1.0.1- 1Password + CLI: 8.11.22
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Start by reproducing the mounted .env behavior with the named load_dotenv() and dotenv_values() entry points on macOS. Trace how they open and read the supplied path, then verify completion by confirming that key/value pairs from the 1Password-mounted file are loaded rather than an empty string.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python
- Domaine
- tooling
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 42/100