plotly / plotly/dash

Dash in Jupyter tries to bind to $HOST set by conda, cannot override

Open
#3,065 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug P2
Dominant language
Python
Stars
24.4k
Forks
2.3k
Avg merge
2d 7h
Merged PRs (30d)
13

Description

Summary

Micromamba, and supposedly other python package managers set the HOST environment variable to something like x86_64-conda-linux-gnu. Then, when I try to run a dash app in Jupyter, I get an error as dash tries to bind to host "x86_64-conda-linux-gnu", which obviously doesn't resolve to a valid IP. Here's a stackoverflow post about the error:

https://stackoverflow.com/questions/61006240/name-or-service-not-known-when-running-a-dash-app

In the above case, the solution was to use the host parameter of app.run().
However, the parameter does not seem to override $HOST in a Jupyter environment.

Packages:

dash                 2.18.1
jupyter_client                8.6.3
jupyter_core                  5.7.2
jupyter-events                0.10.0
jupyter-lsp                   2.2.5
jupyter_server                2.14.2
jupyter_server_terminals      0.5.3
jupyterlab                    4.2.5
jupyterlab_pygments           0.3.0
jupyterlab_server             2.27.3
jupyterlab_widgets            3.0.13

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with Micromamba or another package manager that sets HOST, then run a Dash app in Jupyter and pass an explicit host to app.run(). Trace the Jupyter-specific startup path to identify where HOST takes precedence. Done means the explicit host works in Jupyter despite the environment variable, with a regression test covering that case.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter, python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.