Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Ganesh Pal Newsgroups: comp.lang.python Subject: TypeError: not all arguments converted during string formatting Date: Wed, 17 Feb 2016 19:28:51 +0530 Lines: 34 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de RBxjFt0VoDEWe1H6IaIVzwSYj7Gv2zkHd9hMufa/4lgA== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'formatting': 0.07; 'subject:string': 0.09; 'typeerror:': 0.09; 'python': 0.10; 'subject:not': 0.11; 'exception': 0.13; '(pdb)': 0.16; 'e))': 0.16; 'emit': 0.16; 'err': 0.16; 'err,': 0.16; 'failed")': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'string': 0.17; 'try:': 0.18; 'team,': 0.18; 'skip:" 40': 0.20; 'to:name:python- list@python.org': 0.20; '%s"': 0.22; 'arguments': 0.22; 'converted': 0.22; '(most': 0.24; 'linux': 0.26; 'error': 0.27; 'message-id:@mail.gmail.com': 0.27; '2.6': 0.27; 'ret': 0.29; 'raise': 0.29; 'print': 0.30; 'code': 0.30; 'subject:all': 0.32; 'getting': 0.33; 'run': 0.33; 'traceback': 0.33; 'file': 0.34; 'except': 0.34; 'received:google.com': 0.35; 'replaced': 0.35; 'received:209.85': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'suggestion': 0.37; 'received:209': 0.38; 'format': 0.39; 'skip:e 20': 0.39; 'to:addr:python.org': 0.40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=M8bSxDVS3PhIxarTnbZVZvAGFKN99ZDmRJ+tJ75dSJU=; b=wn7aZGW+lbNsHkgyCFzDhsdG4m0tYkddZ7iOI/ug+U8LXSD00fAiB9eTOs/qq3mDy1 pvbZwLLHsYVc+1i3MKA81CEgCegW7YcLdLLk+ppesOvFRcFp2NyFMPt4jW8KM4QXmJ6D PdSLRSGkScZ2VNOgjz65CS4Aaq4y5+KPG8PxJZlzosMU7Rps1Q3SsYaNmCpu5lpoxxv2 7ywxn7LgQvBqbFvyiFNynrrpSLqd4+9o2veCM1PUHRMTAuKM02k4fhLaN7tWFdkFfriG ko/dBmSUoROhil9upWTNKjGBJTe1Xwj7SiBE/XvKFKcekiXfwebG1PGglcN8dUbITsoW F7iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=M8bSxDVS3PhIxarTnbZVZvAGFKN99ZDmRJ+tJ75dSJU=; b=mKdu0jzz+NwEPH1KU9atLVseukcrtH/r46N5JjqaEIrhfAop55L7Ckgu0/vb2ovD1+ 0uzySoCoRIqx0Bq/xFzTZawVb26VBXS9e1RRsFgSkMQOHQroJmkRkg1znznV51PzfEga cTmbjhh65frhSuL0DZ8z77iIeDatJ21LWr1j2mqmzsC+CEA8IsRVqEaDcVr8EQfFmWJ8 GFQkp4gaYYxK9woNmDVBXHMUdWJ6TFmJrA2dyO4+LOQ75Ok1y4lq/KlDxymzEWNoPI42 SN7cOc9t+OtlWISpIqHTTtM1uUe32tmBJzrhFtIPSuzv9LFnmpM9tv2uhyEORxpuL5Gh tKlw== X-Gm-Message-State: AG10YORLvFYDEJDBv3+zmU8DfcFSe5gB8Bai3hWMoWloRIaDMoNUx5tavrztRaWHjgFLkVg5nhqxXdeAonQHXg== X-Received: by 10.112.223.37 with SMTP id qr5mr832371lbc.19.1455717531401; Wed, 17 Feb 2016 05:58:51 -0800 (PST) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21rc2 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:103053 Hi Team, Iam on python 2.6 and Linux , I had replaced print out, err ret with logging.info(out, err ,ret) in the below code . I am getting "TypeError: not all arguments converted during string formatting" error any quick suggestion try: out, err, ret = run(cmd, timeout=60) # New line added below logging.info(out, err ,ret) if ret != 0: logging.error("Can't run %s got %s (%d)!" % (cmd, err, ret)) raise Exception("Preparing cluster failed...Exiting !!!") except Exception as e: logging.exception("Failed to run %s got %s" % (cmd, e)) sys.exit("Preparing cluster failed") logging.info("Preparing Cluster.....Done !!!") (Pdb) c Traceback (most recent call last): File "/usr/local/lib/python2.6/logging/__init__.py", line 755, in emit File "/usr/local/lib/python2.6/logging/__init__.py", line 637, in format File "/usr/local/lib/python2.6/logging/__init__.py", line 425, in format File "/usr/local/lib/python2.6/logging/__init__.py", line 295, in getMessage TypeError: not all arguments converted during string formatting Regards, Ganesh