Coder Social home page Coder Social logo

Comments (8)

wyattscarpenter avatar wyattscarpenter commented on June 10, 2024 1

@raethlein interesting! I'm on Windows 10 (and the same thing happens in WSL on that machine). As far as I know I'm not in a VPN, VM, or container. I'm using streamlit 1.34.0 but it's been like this since I can remember. I can connect via localhost.

Looking at the method you cite, the cause is straightforward: I have server.headless set to true in the config as well. So the elif config.get_option("server.headless") triggers. Removing that makes my ouput

  Local URL: http://localhost:8501
  Network URL: http://10.150.8.250:8501

as well.

from streamlit.

raethlein avatar raethlein commented on June 10, 2024 1

Great!
Do you have a suggestion of how we could improve the docs to make this more clear or is it good as is then?

from streamlit.

vdonato avatar vdonato commented on June 10, 2024 1

Going to transfer this issue into the docs repo so that it's in a more correct location

(Huh, looks like I can't for some reason 😕)

from streamlit.

wyattscarpenter avatar wyattscarpenter commented on June 10, 2024 1

That seems like a pretty good solution to me.

from streamlit.

github-actions avatar github-actions commented on June 10, 2024

If this issue affects you, please react with a 👍 (thumbs up emoji) to the initial post.

Your feedback helps us prioritize which bugs to investigate and address first.

Visits

from streamlit.

raethlein avatar raethlein commented on June 10, 2024

Hey @wyattscarpenter, I have just tried to reproduce it on my M1 Mac, but there it behaves correctly and I correctly see

You can now view your Streamlit app in your browser.

Local URL: http://localhost:3000
Network URL: http://192.168.0.200:3000

The log lines seem to come from this method where also the IP address is determined; when no respective config options are set, it seems to jump into net_util.get_internal_ip() which seems to determine the IP address via the socket package for the log. The bound address itself should depend on tornado's listen method which we call here.

I don't have anything set in the config.toml file. Are you connected to a VPN or run the app in a virtual machine or container or so? And are you able to connect to the app via localhost despite the log showing a different address?

from streamlit.

wyattscarpenter avatar wyattscarpenter commented on June 10, 2024

I'm not sure whether or not it's a docs issue. I don't know why the server.headless setting overrides the browser.serverAddress setting. Maybe it's a good reason, since the behavior seems intentional. I could imagine that for some reason a headless server might need to output the things it currently does. But maybe not.

Assuming the behavior is desirable: add note (in both places?) that server.headless overrides the browser.serverAddress setting.

If the behavior isn't desirable: make it not do that, I suppose.

from streamlit.

raethlein avatar raethlein commented on June 10, 2024

good points, thanks 🙂 I guess the behavior is desirable since you can also connect via localhost and that the output prints are misleading. So looking at the lines I guess that localhost should be printed out additionally when the mode is headless.

from streamlit.

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.