You are not logged in.
Pages: 1
Hi,
When I run control server on the MAC 10.11. I got some errors related to socket.gethostbyname in the server.py
Seems this is the useless function. so I just quick fix it like this. Then the USB version of control server works fine for me.
Hope this information help for others too.
Wuulong
--------------------------------------
# Print server configurations.
#ip = socket.gethostbyname(socket.gethostname())
ip="localhost"
print '"PLEN - Control Server" is on "%s:%d".' % (ip, args.port)
Offline
Hi, wuulong.
Thanks for reporting the issue, and the method which fixes it.
I never saw a bug like the issue, so I interested in when happen the phenomenon.
Would you tell me that the problem is happening even if to call the methods only in your enviroment?
For example, what is a result when running the code below?
```python
# -*- coding: utf-8 -*-
import socket
print socket.gethostname()
print socket.gethostbyname(socket.gethostname())
```
Last edited by Guvalif (2015-11-19 04:55:20)
Offline
I think the problem cause by some wrong configuration of my mac. Maybe caused by DHCP or DNS.
Because the unix command $ping `hostname` can't get the right result.
Suggest to ignore this errors.
Best Regards,
$ python
Python 2.7.10 (v2.7.10:15c95b7d81dc, May 23 2015, 09:33:12)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> print socket.gethostname()
wuulong-pro
>>> print socket.gethostbyname(socket.gethostname())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
socket.gaierror: [Errno 8] nodename nor servname provided, or not known
$ hostname
wuulong-pro
$ping `hostname`
ping: cannot resolve wuulong-pro: Unknown host
Offline
Pages: 1