Cameron Simpson <c...@cskk.id.au> writes: > On 19Sep2018 09:12, synch1...@gmail.com <synch1...@gmail.com> wrote: >>I'm just trying to follow along with the logging tutorial documentation and I >>am getting this error: >> >>import logging >> >>logging.basicConfig(format= '%(asctime)s % (message)s', datefmt='%m%d%Y >>%I:%M:%S %p') > > Probably this: --------------------------^^ > > The space after the "%" in "% (message)s" is preventing correct > recognision of the format.
Yes. It makes sense to copy-paste examples instead of typing them in. I guess the original is from https://docs.python.org/2/howto/logging.html#changing-the-format-of-displayed-messages and it doesn't have the extra space which is a problem here. -- https://mail.python.org/mailman/listinfo/python-list