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

Crash on negative (unavailable?) terminal width #901

ark3 opened this issue Jan 22, 2019 · 0 comments

Crash on negative (unavailable?) terminal width #901

ark3 opened this issue Jan 22, 2019 · 0 comments


Copy link

@ark3 ark3 commented Jan 22, 2019

Reported traceback is:

Traceback (most recent call last):
  File "/usr/bin/telepresence/telepresence/", line 131, in crash_reporting
  File "/usr/bin/telepresence/telepresence/", line 49, in main
    runner.kubectl = KubeInfo(runner, args)
  File "/usr/bin/telepresence/telepresence/", line 168, in __init__
  File "/usr/bin/telepresence/telepresence/", line 235, in _check_versions
  File "/usr/bin/telepresence/telepresence/runner/", line 164, in show
    print(self.wrapper.fill(line), file=sys.stderr)
  File "/opt/circleci/.pyenv/versions/3.5.2/lib/python3.5/", line 364, in fill
    return "\n".join(self.wrap(text))
  File "/opt/circleci/.pyenv/versions/3.5.2/lib/python3.5/", line 355, in wrap
    return self._wrap_chunks(chunks)
  File "/opt/circleci/.pyenv/versions/3.5.2/lib/python3.5/", line 249, in _wrap_chunks
    raise ValueError("invalid width %r (must be > 0)" % self.width)
ValueError: invalid width -1 (must be > 0)

I'm not sure how to reproduce this, but fixing it is straightforward. Essentially, if term_width is less than some reasonable minimum (20?), then just set it to 99999 so that we don't try to word wrap.

@ark3 ark3 added this to To do in Tel Tracker via automation Jan 22, 2019
@ark3 ark3 closed this in 11955ae Jan 24, 2019
Tel Tracker automation moved this from To do to Done Jan 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant