mini-dinstall: \"File contains parsing errors\"
03 Sep 2013While setting up mini-dinstall today, I tripped over this error:
$ mini-dinstall -b
Traceback (most recent call last):
File "/usr/bin/mini-dinstall", line 205, in <module>
configp.read(configfile_names)
File "/usr/lib/python2.7/ConfigParser.py", line 305, in read
self._read(fp, filename)
File "/usr/lib/python2.7/ConfigParser.py", line 546, in _read
raise e
ConfigParser.ParsingError: File contains parsing errors: /home/hugh/.mini-dinstall.conf
[line 2]: ' mail_to = sysadmin@example.com\n'
[line 3]: ' incoming_permissions = 0755\n'
[line 4]: ' architectures = all, amd64\n'
[line 5]: ' archive_style = simple-subdir\n'
[line 6]: ' dynamic_reindex = 1\n'
[line 7]: ' archivedir = /home/hugh/public_html/debian/\n'
Eventually, I figured out the reason: leading spaces in each line. I'd assumed I could write the config file like so:
[section]
# Notice the indentation!
key = value
otherkey = othervalue
but that's incorrect; it needs to be like so:
[section]
# Indentation is for suckers and chumps. Apparently.
key = value
otherkey = othervalue
Hopefully that saves someone half an hour...
Add a comment:
Name and email required; email is not displayed.
Related Posts
QRP weekend 08 Oct 2018
Open Source Cubesat Workshop 2018 03 Oct 2018
mpd crash? try removing files in /var/lib/mpd/ 11 Aug 2018