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


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

TypeError: not all arguments converted during string formatting

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

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


Contents

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

#103053 — TypeError: not all arguments converted during string formatting

FromGanesh Pal <ganesh1pal@gmail.com>
Date2016-02-17 19:28 +0530
SubjectTypeError: not all arguments converted during string formatting
Message-ID<mailman.209.1455717533.22075.python-list@python.org>
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