GithubHelp home page GithubHelp logo

Comments (12)

keredson avatar keredson commented on August 16, 2024
(([ip for ip in socket.gethostbyname_ex(socket.gethostname())[2] if not ip.startswith("127.")] or [[(s.connect(("8.8.8.8", 53)), s.getsockname()[0], s.close()) for s in [socket.socket(socket.AF_INET, socket.SOCK_DGRAM)]][0][1]]) + [None])

could you tell me what this give you?

from gnomecast.

sylvainmetayer avatar sylvainmetayer commented on August 16, 2024

Here is the result : ['82.216.111.26', None] (with the import of socket, it wasn't working otherwise)

from gnomecast.

keredson avatar keredson commented on August 16, 2024

What version of python? Do you have a local firewall running?

from gnomecast.

sylvainmetayer avatar sylvainmetayer commented on August 16, 2024

Python 3.6
I've just switched from Debian to Fedora, and it seems that the firewall policy is quite different. I'll look into it.

from gnomecast.

keredson avatar keredson commented on August 16, 2024

can you do the following w/o the error?

    with contextlib.closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as s:
      s.bind(('0.0.0.0', 0))

from gnomecast.

sylvainmetayer avatar sylvainmetayer commented on August 16, 2024

I've disabled the firewall in fedora but still experience the same issue.
I've tried your code snippet and I've had no output, but no error.

from gnomecast.

fiendish avatar fiendish commented on August 16, 2024

Here is the result : ['82.216.111.26', None]

82? What does ifconfig show?

from gnomecast.

keredson avatar keredson commented on August 16, 2024

i switched the bind to the universal address for you. please try v0.2.11 to see if this is fixed. (prob. it will also error when the HTTP server is binding. i'd like to see the output for that.)

from gnomecast.

sylvainmetayer avatar sylvainmetayer commented on August 16, 2024

Sorry about the delay.
I've just upgrade to v0.2.15 and it is now working ! Thanks a lot ! :)

from gnomecast.

keredson avatar keredson commented on August 16, 2024

awesome! thanks!

from gnomecast.

renich avatar renich commented on August 16, 2024

I'm having this issue in Fedora 33; with python3.9 and pretty much the same results when issuing the commands. I get my public IP instead of my local IP.

from gnomecast.

renich avatar renich commented on August 16, 2024

I've fixed it by adding an entry to /etc/hosts. Basically,

10.0.86.99 mydesktop.local mydesktop

So that gnomecast can get the proper IP. Now, it gets the internal IP; not the public one.

from gnomecast.

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.