Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.048 X-Spam-Evidence: '*H*': 0.90; '*S*': 0.00; 'indicates': 0.09; 'subject:script': 0.09; "'client',": 0.16; 'help?': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'trying': 0.19; 'email addr:gmail.com>': 0.22; 'error': 0.23; 'config': 0.24; 'script.': 0.24; 'mon,': 0.24; 'looks': 0.24; 'skip:" 30': 0.26; 'header:In-Reply-To:1': 0.27; 'raise': 0.29; "doesn't": 0.30; 'message-id:@mail.gmail.com': 0.30; 'asked': 0.31; 'getting': 0.31; 'username': 0.31; 'anyone': 0.31; 'file': 0.32; 'option': 0.32; 'linux': 0.33; 'running': 0.33; '(most': 0.33; 'but': 0.35; 'received:google.com': 0.35; 'object,': 0.36; 'to:addr:python- list': 0.38; 'files': 0.38; 'pm,': 0.38; 'recent': 0.39; 'skip:& 20': 0.39; 'to:addr:python.org': 0.39; 'read': 0.60; 'simple': 0.61; "you've": 0.63; 'configparser': 0.84; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=Iw+cpgV9sgibLhe4W9ldOWBhrBV+QttgNC1BvfD50Iw=; b=aTN53PZ+Y7O7nDDSxH+wJAYOFEkGmu9JmnUuFtprORo2IkIWmryEEizUPp3ruszvKh TpToC0Z6pILer0z3ejSmB8XT7Cx86hEB9HHXAdE0rwcmx+SOW93541HNW/SstXJPnoGC PmuMf7I4BlNS4nuErvuEEcDcDweANeCwgpaipkNCdtMMulcN2LaxEjjUuhDe/zP9sPyk mSMLQwO5vfRIsWNb8UCsi7OcqEG7OHaHENqbJlGQMGnasRT4+ojEXt87pLQaoylRW3WF zzqh1/AXNmnJurkU+1V5wEFrvHGihGRFGfUFzYtREOS+XncHpqBXEzYLBfV2SUWAxZLT n5Gg== MIME-Version: 1.0 X-Received: by 10.68.171.196 with SMTP id aw4mr26984338pbc.78.1367867493550; Mon, 06 May 2013 12:11:33 -0700 (PDT) In-Reply-To: References: Date: Mon, 6 May 2013 15:11:33 -0400 Subject: Re: python backup script From: Jerry Hill To: "python-list (General)" Content-Type: multipart/alternative; boundary=047d7bacb5160d92bc04dc11786f X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 64 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1367867496 news.xs4all.nl 16010 [2001:888:2000:d::a6]:37532 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:44843 --047d7bacb5160d92bc04dc11786f Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Mon, May 6, 2013 at 3:01 PM, MMZ wrote: > I am trying to backup database on CentOS linux server,I'm getting error > when running the following script. anyone can help? > > Traceback (most recent call last): > File "./backup.py", line 8, in ? > username =3D config.get('client', 'mmz') > File "/usr/lib/python2.4/ConfigParser.py", line 511, in get > raise NoSectionError(section) > =E2=80=8BI've never used ConfigParser, but that =E2=80=8B =E2=80=8Berror message looks pretty simple to interpret. You've set up a ConfigParser object, told it to read in ~/my.cnf, the asked for the value of section 'client', option 'mmz'. The error indicates that your config files doesn't have a section named 'client'. What is the content of your ~/my.cnf file? --=20 Jerry --047d7bacb5160d92bc04dc11786f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Mon, May 6, 2013 at 3:01 PM, MMZ <= programme= r.toronto@gmail.com> wrote:
I am trying to backup database on CentOS lin= ux server,I'm getting error when running the following script. anyone c= an help?

Traceback (most recent call last):
=C2=A0 File "./backup.py", line 8, in ?
=C2=A0 =C2=A0 username =3D config.get('client', 'mmz')
=C2=A0 File "/usr/lib/python2.4/ConfigParser.py", line 511, in ge= t
=C2=A0 =C2=A0 raise NoSectionError(section)

=E2=80=8BI've never used ConfigParser, but that =E2=80=8B=C2=A0
=E2=80=8Berror message looks pretty simple to interpret.=C2=A0 You've s= et up a ConfigParser object, told it to read in ~/my.cnf, the asked for the= value of section 'client', option 'mmz'.=C2=A0 The error i= ndicates that your config files doesn't have a section named 'clien= t'.

What is the content of your ~/my.cnf file?

= --
Jerry
--047d7bacb5160d92bc04dc11786f--