Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Command text wrapping doesn't work in a python 3.7 image on rancher #19

Open
dshen109 opened this issue May 8, 2019 · 1 comment
Labels
helpwanted Please contribute to fixing this!

Comments

@dshen109
Copy link
Contributor

dshen109 commented May 8, 2019

Something is causing the default column width to return -1 when subcommands are run via docker entrypoint. This bug does not happen when the command is run normally via the shell.

Traceback:

5/7/2019 4:07:25 PMTraceback (most recent call last):
5/7/2019 4:07:25 PM  File "/usr/local/bin/calc_ingest", line 10, in <module>
5/7/2019 4:07:25 PM    sys.exit(Main.console_script())
5/7/2019 4:07:25 PM  File "/usr/local/lib/python3.7/site-packages/pytool/cmd.py", line 315, in console_script
5/7/2019 4:07:25 PM    cls().start(sys.argv[1:])
5/7/2019 4:07:25 PM  File "/usr/local/lib/python3.7/site-packages/pytool/cmd.py", line 138, in __init__
5/7/2019 4:07:25 PM    self.set_opts()
5/7/2019 4:07:25 PM  File "/usr/src/app/calc_ingest/__main__.py", line 24, in set_opts
5/7/2019 4:07:25 PM    self.subcommand('run', help="Run the service")
5/7/2019 4:07:25 PM  File "/usr/local/lib/python3.7/site-packages/pytool/cmd.py", line 284, in subcommand
5/7/2019 4:07:25 PM    kwargs['description'] = pytool.text.wrap(kwargs['description'])
5/7/2019 4:07:25 PM  File "/usr/local/lib/python3.7/site-packages/pytool/text.py", line 124, in wrap
5/7/2019 4:07:25 PM    line = wrapper.fill(line)
5/7/2019 4:07:25 PM  File "/usr/local/lib/python3.7/textwrap.py", line 363, in fill
5/7/2019 4:07:25 PM    return "\n".join(self.wrap(text))
5/7/2019 4:07:25 PM  File "/usr/local/lib/python3.7/textwrap.py", line 354, in wrap
5/7/2019 4:07:25 PM    return self._wrap_chunks(chunks)
5/7/2019 4:07:25 PM  File "/usr/local/lib/python3.7/textwrap.py", line 248, in _wrap_chunks
5/7/2019 4:07:25 PM    raise ValueError("invalid width %r (must be > 0)" % self.width)
5/7/2019 4:07:25 PMValueError: invalid width -1 (must be > 0)
@samhollenbach
Copy link

Just commenting to say that I ran into this bug today, and googling the error gave 1 result, which was this issue... had a good laugh :)

@shakefu shakefu added the helpwanted Please contribute to fixing this! label Dec 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
helpwanted Please contribute to fixing this!
Projects
None yet
Development

No branches or pull requests

3 participants