MissingSectionHeaderError:文件不包含节标题 [英] MissingSectionHeaderError: File contains no section headers

查看:25
本文介绍了MissingSectionHeaderError:文件不包含节标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试根据本手册构建collective.simserver,并进行了一些修改:

I am trying to build collective.simserver according to this manual, with some modifications:

instead of: virtualenv --python=bin/python2.7 simserver/
I am using: virtualenv --python=myVirtualEnv/bin/python simserver

我设法做到了这一点:

myVirtualEnv/bin/python bootstrap.py

然后它与此错误信息分开:

and then it breaks apart with this error info:

An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
  File "/tmp/tmpLiHZgo/zc.buildout-1.6.3-py2.6.egg/zc/buildout/buildout.py", line 1851, in main
    command)
  File "/tmp/tmpLiHZgo/zc.buildout-1.6.3-py2.6.egg/zc/buildout/buildout.py", line 203, in __init__
    data['buildout'].copy(), override, set()))
  File "/tmp/tmpLiHZgo/zc.buildout-1.6.3-py2.6.egg/zc/buildout/buildout.py", line 1465, in _open
    parser.readfp(fp)
  File "/usr/lib/python2.6/ConfigParser.py", line 305, in readfp
    self._read(fp, filename)
  File "/usr/lib/python2.6/ConfigParser.py", line 482, in _read
    raise MissingSectionHeaderError(fpname, lineno, line)
MissingSectionHeaderError: File contains no section headers.
file: /home/nenad/buildout.cfg, line: 4
'<!DOCTYPE html>\n'
Mint-AMD64 nenad # 

可能有什么问题?

推荐答案

配置文件中没有节头.

配置文件由部分组成,由 [section] 标题引导,后跟名称:值条目.

The configuration file consists of sections, led by a [section] header and followed by name: value entries.

Docs CofigParser python 模块

这篇关于MissingSectionHeaderError:文件不包含节标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆