From 79f9be98f9d71981bd0dbeec3b4f3d158f89b3ff Mon Sep 17 00:00:00 2001 From: Darin Deforest Date: Fri, 8 Dec 2017 12:38:00 -0700 Subject: [PATCH 1/2] fix 1771 --- gensim/utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/gensim/utils.py b/gensim/utils.py index bca29e73cc..c8c45badbf 100644 --- a/gensim/utils.py +++ b/gensim/utils.py @@ -626,6 +626,7 @@ def get_my_ip(): import socket try: import Pyro4 + import Pyro4.naming # we know the nameserver must exist, so use it as our anchor point ns = Pyro4.naming.locateNS() s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) From 86688e00a9bd4a678fbd60ee5ff065e870f4e735 Mon Sep 17 00:00:00 2001 From: Menshikh Ivan Date: Mon, 11 Dec 2017 15:21:11 +0500 Subject: [PATCH 2/2] fix import --- gensim/utils.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gensim/utils.py b/gensim/utils.py index c8c45badbf..a90f1f0b39 100644 --- a/gensim/utils.py +++ b/gensim/utils.py @@ -625,10 +625,9 @@ def get_my_ip(): """ import socket try: - import Pyro4 - import Pyro4.naming + from Pyro4.naming import locateNS # we know the nameserver must exist, so use it as our anchor point - ns = Pyro4.naming.locateNS() + ns = locateNS() s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.connect((ns._pyroUri.host, ns._pyroUri.port)) result, port = s.getsockname()