Thursday, September 27, 2012

Re: i am getting ConfigParser.NoSectionError: No section: 'database' plz help

Hi, It seems that. config file doesnt hv the section you are looking for.
Use Config.sections() to list the available sections in your config file 

>>> import ConfigParser  >>> Config = ConfigParser.ConfigParser()  >>> Config  <ConfigParser.ConfigParser instance at 0x00BA9B20>  >>> Config.read("configfile.ini")  ['tomorrow.ini']  >>> Config.sections()  ['Others', 'SectionThree', 'SectionOne', 'SectionTwo']  
--Laxmikant

On Fri, Sep 28, 2012 at 9:35 AM, Navnath Gadakh <navnathgadakh@gmail.com> wrote:
ConfigParser.NoSectionError: No section: 'database'

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/0uRjwXdd_jIJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.



--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment