轨道发射问题:“ConfigParser.NoSectionError:No section:'formatters'”

时间:2011-05-26 13:34:45

标签: python django comet stomp orbited

我正试图让Orbited开始,但不幸的是我遇到了不止一些问题!首先,easy_install的问题(已解决)。然后,继续http://mischneider.net/?p=125的说明。但是当使用orbited -c orbited.cnf时,我得到以下内容:

Traceback (most recent call last):
  File "C:\Python27\Scripts\orbited-script.py", line 8, in <module>
    load_entry_point('orbited==0.7.11beta3', 'console_scripts', 'orbited')()
  File "C:\Python27\lib\site-packages\orbited-0.7.11beta3-py2.7.egg\orbited\star
t.py", line 133, in main
    logging.config.fileConfig(options.config)
  File "C:\Python27\lib\logging\config.py", line 70, in fileConfig
    formatters = _create_formatters(cp)
  File "C:\Python27\lib\logging\config.py", line 106, in _create_formatters
    flist = cp.get("formatters", "keys")
  File "C:\Python27\lib\ConfigParser.py", line 567, in get
    raise NoSectionError(section)
ConfigParser.NoSectionError: No section: 'formatters'

这是我的配置文件(orbited.cnf):

[listen]
http://:9000
stomp://:61613

[access]
* -> localhost:61613

[global]
session.ping_interval = 300

(编辑:我可能需要[格式]部分?) 我绝对没有任何东西,而且我发现大部分资源都指向orbited.org,因为我对轨道感兴趣的那一天就已经失败了。请帮帮我!我真的想开始使用酷炫的django应用程序!

2 个答案:

答案 0 :(得分:7)

tar文件中有一个示例配置文件。 您可以在https://bitbucket.org/desmaj/orbited/src/1a8a47861f1d/daemon/orbited.cfg.example

在线找到它

从[loggers]部分开始复制所有内容。 在需要更多调试信息的地方设置相关级别= DEBUG

- sid

答案 1 :(得分:3)

以防万一有人想要根据sid的建议加入C&amp; P代码。如果它有用,请提供他的答案,而不是这个!

# new logging configuration using the python stdlib logging.fileConfig
[loggers]
keys = root,orbited,orbited_TCPConnectionResource

[handlers]
keys = console,errors,connections

[formatters]
keys = generic

[logger_root]
level = NOTSET
handlers = console

[logger_orbited]
level = WARN
handlers = errors
qualname = orbited

[logger_orbited_TCPConnectionResource]
level = DEBUG
handlers = connections
qualname = orbited.cometsession.TCPConnectionResource

[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = INFO
formatter = generic

[handler_errors]
class = FileHandler
args = ('error.log', 'w')
level = WARN
formatter = generic

[handler_connections]
class = FileHandler
level = DEBUG
formatter = generic
args = ('connections.log', 'w')

[formatter_generic]
format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s