[Python]解析.ini 文件出错ConfigParser.MissingSectionHeaderError: File contains no section headers.
2014-03-13 10:17
1651 查看
.ini文件内容如下
[global]
timeout=60
index-url=http://pypi.douban.com/simple
报错如下
ConfigParser.MissingSectionHeaderError: File contains no section headers.
file: C:\Users\Administrator\pip\pip.ini, line: 1
'\xef\xbb\xbf[global]\n'
解决办法
使用记事本打开文件,然后另存为asicii编码就行了。
[global]
timeout=60
index-url=http://pypi.douban.com/simple
报错如下
ConfigParser.MissingSectionHeaderError: File contains no section headers.
file: C:\Users\Administrator\pip\pip.ini, line: 1
'\xef\xbb\xbf[global]\n'
解决办法
使用记事本打开文件,然后另存为asicii编码就行了。
相关文章推荐
- ConfigParser MissingSectionHeaderError: File contains no section headers.
- Numpy ConfigParser.MissingSectionHeaderError: File contains no section headers.
- Python读取配置文件:ConfigParser.NoSectionError: No section:
- ConfigParser读取记事本、notepad++修改后的配置文件会出现:ConfigParser.MissingSectionHeaderError
- ConfigParser读取配置文件出现ConfigParser.MissingSectionHeaderError
- Python 解析ini文件 By ConfigParser
- python开发_configparser_解析.ini配置文件工具_完整版_博主推荐
- Python用ConfigParser解析INI配置文件
- win10上用Python2.7处理文本,出错IOError: [Errno 2] No such file or directory:如何解决???
- ConfigParser.NoSectionError: No section: 'MongoDB'
- python模块之ConfigParser: 用python解析配置文件[zt]
- Python模块configparser(操作配置文件ini)
- python中用Configparser模块解析配置文件
- ERROR: No pool defined. at least one pool section must be specified in config file
- 【Python】配置文件解析模块ConfigParser使用实例
- python 中对配置文件的解析 ConfigParser & ConfigObj
- 预编译头文件出错(Cannot open precompiled header file: 'Debug/1.pch': No such file or directory)
- 在python中实现自定义配置文件解析及应用技巧[yaml and ConfigParser] 推荐
- cubes框架导入slicer.ini文件报错,处理方法。cubes.errors.ConfigurationError: config should be a ConfigParser instan
- ConfigParser.NoSectionError: No section: 'forma...