Selaa lähdekoodia

get back python-dotenv errors for environment env file (#5203)

Khaleel Al-Adhami 2 viikkoa sitten
vanhempi
säilyke
c1fb194f45
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      reflex/config.py

+ 2 - 2
reflex/config.py

@@ -55,7 +55,7 @@ def _load_dotenv_from_str(env_files: str) -> None:
 
 
     if load_dotenv is None:
     if load_dotenv is None:
         console.error(
         console.error(
-            """The `python-dotenv` package is required to load environment variables from a file. Run `pip install "python-dotenv>=1.0.1"`."""
+            """The `python-dotenv` package is required to load environment variables from a file. Run `pip install "python-dotenv>=1.1.0"`."""
         )
         )
         return
         return
 
 
@@ -68,7 +68,7 @@ def _load_dotenv_from_str(env_files: str) -> None:
 
 
 
 
 # Load the env files at import time if they are set in the ENV_FILE environment variable.
 # Load the env files at import time if they are set in the ENV_FILE environment variable.
-if load_dotenv is not None and (env_files := os.getenv("ENV_FILE")):
+if env_files := os.getenv("ENV_FILE"):
     _load_dotenv_from_str(env_files)
     _load_dotenv_from_str(env_files)