theskumar / theskumar/python-dotenv

Doesn't accept any pathnames nor show errors on python 3.9.2 / raspberry pi

Abierto
#427 3 comentarios 1 reacción 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Lenguaje dominante
Python
Estrellas
8.9k
Forks
581
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Either running from a script, or from the command line, it doesn't accept any pathnames as valid arguments

toni@rpi:~/temp $ pwd
/home/toni/temp
toni@rpi:~/temp $ dotenv list
ENV1=value1
ENV2=value2
toni@rpi:~/temp $ dotenv -f /home/toni/temp list
Usage: dotenv list [OPTIONS]
Try 'dotenv list --help' for help.

Error: Invalid value: Path "/home/toni/temp" does not exist.
toni@rpi:~/temp $ dotenv -f . list
Usage: dotenv list [OPTIONS]
Try 'dotenv list --help' for help.

Error: Invalid value: Path "." does not exist.
toni@rpi:~/temp $ dotenv -f / list
Usage: dotenv list [OPTIONS]
Try 'dotenv list --help' for help.

Error: Invalid value: Path "/" does not exist.
toni@rpi:~/temp $ 

In a script, load_dotenv() works if I'm in the correct directory. However, load_dotenv(dotenv_path="/home/toni/temp", verbose=True) or any other directory falls silently without populating the relevant environment variables.

The environment:

toni@rpi:~/temp $ python -V
Python 3.9.2
toni@rpi:~/temp $ cat /etc/issue
Debian GNU/Linux 11 \n \l

toni@rpi:~/temp $ uname -a
Linux rpi 5.15.61-v8+ #1579 SMP PREEMPT Fri Aug 26 11:16:44 BST 2022 aarch64 GNU/Linux
toni@rpi:~/temp $

Happy to provide further debugging information as needed. Your contribution guidelines don't provide any guidance on what's useful. Perhaps that could be something to add, too, to make issue submissions easier to look at.

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Start by reproducing the reported dotenv -f commands and the load_dotenv(dotenv_path=..., verbose=True) call on the documented Python and Debian environment. Trace the CLI path handling and the load_dotenv entry point; done means valid pathnames are accepted, failures are reported appropriately, and variables load from the specified path.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
python
Área
backend, cli
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.