New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No service found under Windows but working under Ubuntu VM. #84
Comments
For the time being, removing: from: |
same here. chromecast is found on ubuntu but not on windows. commenting out the line if addr.get('netmask') != HOST_ONLY_NETWORK_MASK makes it work under win7 too. |
I got a similar problem with the ServiceBrowser not finding any devices. The cause was one of zeroconf's dependencies: netifaces. Installing the latest version will download version 0.10.5, but with this version it breaks my ServiceBrowser by not finding anything. Downgrading to 0.10.4 and everything works fine. pip uninstall netifaces ps. tested with zeroconf version 0.17.6 as well as 0.17.5 |
I can confirm this problem on python 32 under windows 7. |
The problem does not occur with 64 bit python under win7, I don't have an explanation for this though. |
The problem is occurring for me on Win10 Python 64-bit. I'm using zeroconf 0.10.5. Same as previous posters, the fix that basic-settings suggested works for me. In my Windows setting, I am not able to easily downgrade to zeroconf 0.10.4 due to not having the C++ build tools (and not wanting to install 4 gigs worth of them). A full solution would be nice. Also, Windows wheel files for 0.10.4 would be nice as well. |
upstream issue python-zeroconf#84 fix for windows compatibility
I am seconding @gbiddison on this. We either need to remove this check or change setup.py line 59 to read in order to 'netifaces<=0.10.4', Or drop the following check from zeroconf.py line 1590 if addr.get('netmask') != HOST_ONLY_NETWORK_MASK Alternately we could modify the above check to only take effect on non windows platforms. import platform
# intervening code to line 1590
if (platform.system() == 'Windows') or (addr.get('netmask') != HOST_ONLY_NETWORK_MASK) Either of these will fix the issue with windows compatibility. My company would really like to use this as part of our build system, but we cannot do it if windows is not supported. |
This seems relevant: https://bitbucket.org/al45tair/netifaces/issues/39/netmask-is-always-255255255255 |
Version 0.19.0 has just been released with the |
Thanks @jstasiak! How long does that usually take to propagate up to PyPI? |
I am facing some issues in setting up a client/ServiceBrowser that works under both Win and Linux.
I have the following set-up:
enp0s3 Link encap:Ethernet HWaddr 08:00:27:55:62:63 inet addr:10.121.44.95 Bcast:10.121.44.255 Mask:255.255.255.0 inet6 addr: fe80::aa6b:92c:17c4:cfc8/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1837029 errors:0 dropped:0 overruns:0 frame:0 TX packets:110395 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:467243091 (467.2 MB) TX bytes:7871423 (7.8 MB)
If I run the ServiceBrowser from Windows I don't get any return back. I used the example Browser to test the set-up.
`from zeroconf import ServiceBrowser, Zeroconf
class MyListener(object):
zeroconf = Zeroconf()
listener = MyListener()
browser = ServiceBrowser(zeroconf, "_tntsrv._tcp.local.", listener)
try:
input("Press enter to exit...\n\n")
finally:
zeroconf.close()`
Running from withing Ubuntu, it returns all the available services (as expected).
I noticed that if I change
HOST_ONLY_NETWORK_MASK
from255.255.255.255
to255.255.255.0
the opposite happens, where it works under Windows but not under Ubuntu.This seems to ocurr in line 1603
if addr.get('netmask') != HOST_ONLY_NETWORK_MASK
I'm not experienced enough to find a common ground, but is there any posibility so that it'll work under both systems?
The text was updated successfully, but these errors were encountered: