GithubHelp home page GithubHelp logo

Comments (2)

dosubot avatar dosubot commented on July 17, 2024 2

Hey @DevFyxt! I'm here to help you with any bugs, questions, or contributions you have in mind. I'm a bot designed to assist you while you wait for a human maintainer.

To address the issue where LANGFLOW_OPEN_BROWSER is ignored in the .env file, ensure the following:

  1. Correct Configuration: Verify that the .env file contains the correct configuration:

    LANGFLOW_OPEN_BROWSER=false
  2. Code Reference: The LANGFLOW_OPEN_BROWSER environment variable is read and utilized in the run function within the src/backend/base/langflow/__main__.py file. It is used as the envvar for the open_browser option in the typer.Option call:

    open_browser: bool = typer.Option(
        True,
        help="Open the browser after starting the server.",
        envvar="LANGFLOW_OPEN_BROWSER",
    )
  3. Debugging: Add logging to verify if the LANGFLOW_OPEN_BROWSER setting is being read correctly:

    @field_validator("open_browser", mode="before")
    def set_open_browser(cls, value):
        if os.getenv("LANGFLOW_OPEN_BROWSER"):
            logger.debug(f"Reading LANGFLOW_OPEN_BROWSER: {os.getenv('LANGFLOW_OPEN_BROWSER')}")
            value = os.getenv("LANGFLOW_OPEN_BROWSER")
        logger.debug(f"Setting open_browser to {value}")
        return value
  4. Command-Line Override: Ensure that the --open-browser/--no-open-browser command-line option is not overriding the .env setting. The command-line option can override the LANGFLOW_OPEN_BROWSER environment variable:

    - `--open-browser/--no-open-browser`: Toggles the option to open the browser after starting the server. Can be set using the `LANGFLOW_OPEN_BROWSER` environment variable. The default is `open-browser`.
  5. Environment File: If you specify the --env-file option when running Langflow, the environment variables in the specified file will take precedence over those set in the operating system.

By following these steps, you should be able to ensure that the LANGFLOW_OPEN_BROWSER setting in your .env file is respected [1][2][3][4].

To continue talking to Dosu, mention @dosu.

from langflow.

Cristhianzl avatar Cristhianzl commented on July 17, 2024

Hi @DevFyxt,

The pull request addressing this issue has been merged into the dev branch. Could you please check the latest version of the dev branch to see if the error still occurs?

PR: link

from langflow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.