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


  • 相关阅读:
    计算机网络知识技能水平的测评试题
    Socket与系统调用深度分析
    学习构建调试Linux内核网络代码的环境MenuOS系统
    深入学习socket网络编程,以java语言为例
    网络配置工具iproute2和net-tools的基本原理和基本使用方法
    Linux系统学习总结报告
    结合中断上下文切换和进程上下文切换分析Linux内核的一般执行过程
    深入理解系统调用-40号调用
    基于mykernel2.0 编写一个操作系统内核
    交互式多媒体图书平台的设计与实现
  • 原文地址:https://www.cnblogs.com/taoeternal/p/700458.html
Copyright © 2011-2022 走看看