This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients adambyrtek, aronacher, bethard, ezio.melotti, serhiy.storchaka
Date 2013-08-29.10:57:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Yes, argparse has same problem.

>>> import os, argparse
>>> p = argparse.ArgumentParser(prog='PROG')
>>> os.environ['COLUMNS'] = '16'
>>> print(p.format_help())
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/serhiy/py/cpython/Lib/", line 2329, in format_help
    return formatter.format_help()
  File "/home/serhiy/py/cpython/Lib/", line 276, in format_help
    help = self._root_section.format_help()
  File "/home/serhiy/py/cpython/Lib/", line 206, in format_help
  File "/home/serhiy/py/cpython/Lib/", line 206, in format_help
  File "/home/serhiy/py/cpython/Lib/", line 514, in _format_action
    help_lines = self._split_lines(help_text, help_width)
  File "/home/serhiy/py/cpython/Lib/", line 614, in _split_lines
    return _textwrap.wrap(text, width)
  File "/home/serhiy/py/cpython/Lib/", line 355, in wrap
    return w.wrap(text)
  File "/home/serhiy/py/cpython/Lib/", line 300, in wrap
    return self._wrap_chunks(chunks)
  File "/home/serhiy/py/cpython/Lib/", line 227, in _wrap_chunks
    raise ValueError("invalid width %r (must be > 0)" % self.width)
ValueError: invalid width 0 (must be > 0)
Date User Action Args
2013-08-29 10:57:16serhiy.storchakasetrecipients: + serhiy.storchaka, bethard, aronacher, ezio.melotti, adambyrtek
2013-08-29 10:57:16serhiy.storchakasetmessageid: <>
2013-08-29 10:57:16serhiy.storchakalinkissue13107 messages
2013-08-29 10:57:15serhiy.storchakacreate