zoukankan      html  css  js  c++  java
  • bug of Python

    TurboGear中运行python start-hello.py,错误如下
    2007-04-04 22:04:03,977 cherrypy.msg INFO CONFIG: Server parameters:
    2007-04-04 22:04:03,977 cherrypy.msg INFO CONFIG:   server.environment: developm ent
    2007-04-04 22:04:03,978 cherrypy.msg INFO CONFIG:   server.log_to_screen: True
    2007-04-04 22:04:03,978 cherrypy.msg INFO CONFIG:   server.log_file:
    2007-04-04 22:04:03,978 cherrypy.msg INFO CONFIG:   server.log_tracebacks: True
    2007-04-04 22:04:03,978 cherrypy.msg INFO CONFIG:   server.log_request_headers: True
    2007-04-04 22:04:03,979 cherrypy.msg INFO CONFIG:   server.protocol_version: HTT P/1.0
    2007-04-04 22:04:03,979 cherrypy.msg INFO CONFIG:   server.socket_host:
    2007-04-04 22:04:03,979 cherrypy.msg INFO CONFIG:   server.socket_port: 8080
    2007-04-04 22:04:03,979 cherrypy.msg INFO CONFIG:   server.socket_file:
    2007-04-04 22:04:03,979 cherrypy.msg INFO CONFIG:   server.reverse_dns: False
    2007-04-04 22:04:03,980 cherrypy.msg INFO CONFIG:   server.socket_queue_size: 5
    2007-04-04 22:04:03,980 cherrypy.msg INFO CONFIG:   server.thread_pool: 10
    Unhandled exception in thread started by <bound method Server._start of <cherryp y._cpserver.Server object at 0xb7c442cc>>
    Traceback (most recent call last):
      File "/usr/local/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy /_cpserver.py", line 79, in _start
        self.start_http_server()
      File "/usr/local/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy /_cpserver.py", line 99, in start_http_server
        wait_for_free_port(host, port)
      File "/usr/local/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy /_cpserver.py", line 244, in wait_for_free_port
        check_port(host, port)
      File "/usr/local/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy /_cpserver.py", line 219, in check_port
        socket.SOCK_STREAM):
    socket.gaierror: (-2, 'Name or service not known')

    sourceforge上发现别人说是python的一个bug,确实,解决它只要在/etc/hosts中加入127.0.0.1 localhost就好,这么个问题郁闷半天,faint


  • 相关阅读:
    常见排序算法基于JS的实现
    PubSub的一种实现
    小结JS中的OOP(下)
    自己的一个LESS工具函数库
    小结JS中的OOP(中)
    小结JS中的OOP(上)
    表单的常用操作
    动手写插件之日历插件
    数组排序,字符串math,replace练习
    C++ Const(常类型)的作用总结
  • 原文地址:https://www.cnblogs.com/taoeternal/p/700458.html
Copyright © 2011-2022 走看看