Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #103054 > unrolled thread

Re: TypeError: not all arguments converted during string formatting

Started byGanesh Pal <ganesh1pal@gmail.com>
First post2016-02-17 19:30 +0530
Last post2016-02-17 19:30 +0530
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: TypeError: not all arguments converted during string formatting Ganesh Pal <ganesh1pal@gmail.com> - 2016-02-17 19:30 +0530

#103054 — Re: TypeError: not all arguments converted during string formatting

FromGanesh Pal <ganesh1pal@gmail.com>
Date2016-02-17 19:30 +0530
SubjectRe: TypeError: not all arguments converted during string formatting
Message-ID<mailman.210.1455717622.22075.python-list@python.org>
I think  logging.info(out) works the problem is when I add
logging.info(out,err,ret) ,may be there is a better way to supply this
arguments

On Wed, Feb 17, 2016 at 7:28 PM, Ganesh Pal <ganesh1pal@gmail.com> wrote:
> 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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web