Ошибка в консоли ValueError: invalid width -2 (must be > 0) при запуске команды.
Ошибка
Traceback (most recent call last):
File "/venv/bin/celery", line 8, in <module>
sys.exit(main())
File "/venv/lib/python3.8/site-packages/celery/__main__.py", line 16, in main
_main()
File "/venv/lib/python3.8/site-packages/celery/bin/celery.py", line 322, in main
cmd.execute_from_commandline(argv)
File "/venv/lib/python3.8/site-packages/celery/bin/celery.py", line 499, in execute_from_commandline
super(CeleryCommand, self).execute_from_commandline(argv)))
File "/venv/lib/python3.8/site-packages/celery/bin/base.py", line 305, in execute_from_commandline
return self.handle_argv(self.prog_name, argv[1:])
File "/venv/lib/python3.8/site-packages/celery/bin/celery.py", line 491, in handle_argv
return self.execute(command, argv)
File "/venv/lib/python3.8/site-packages/celery/bin/celery.py", line 415, in execute
return cls(
File "/venv/lib/python3.8/site-packages/celery/bin/worker.py", line 221, in run_from_argv
*self.parse_options(prog_name, argv, command))
File "/venv/lib/python3.8/site-packages/celery/bin/base.py", line 428, in parse_options
self.parser = self.create_parser(prog_name, command)
File "/venv/lib/python3.8/site-packages/celery/bin/base.py", line 440, in create_parser
description=self._format_description(self.description),
File "/venv/lib/python3.8/site-packages/celery/bin/base.py", line 462, in _format_description
text.fill_paragraphs(text.dedent(description), width))
File "/venv/lib/python3.8/site-packages/celery/utils/text.py", line 58, in fill_paragraphs
return sep.join(fill(p, width) for p in s.split(sep))
File "/venv/lib/python3.8/site-packages/celery/utils/text.py", line 58, in <genexpr>
return sep.join(fill(p, width) for p in s.split(sep))
File "/usr/lib/python3.8/textwrap.py", line 391, in fill
return w.fill(text)
File "/usr/lib/python3.8/textwrap.py", line 363, in fill
return "\n".join(self.wrap(text))
File "/usr/lib/python3.8/textwrap.py", line 354, in wrap
return self._wrap_chunks(chunks)
File "/usr/lib/python3.8/textwrap.py", line 248, in _wrap_chunks
raise ValueError("invalid width %r (must be > 0)" % self.width)
ValueError: invalid width -2 (must be > 0)
File "/venv/bin/celery", line 8, in <module>
sys.exit(main())
File "/venv/lib/python3.8/site-packages/celery/__main__.py", line 16, in main
_main()
File "/venv/lib/python3.8/site-packages/celery/bin/celery.py", line 322, in main
cmd.execute_from_commandline(argv)
File "/venv/lib/python3.8/site-packages/celery/bin/celery.py", line 499, in execute_from_commandline
super(CeleryCommand, self).execute_from_commandline(argv)))
File "/venv/lib/python3.8/site-packages/celery/bin/base.py", line 305, in execute_from_commandline
return self.handle_argv(self.prog_name, argv[1:])
File "/venv/lib/python3.8/site-packages/celery/bin/celery.py", line 491, in handle_argv
return self.execute(command, argv)
File "/venv/lib/python3.8/site-packages/celery/bin/celery.py", line 415, in execute
return cls(
File "/venv/lib/python3.8/site-packages/celery/bin/worker.py", line 221, in run_from_argv
*self.parse_options(prog_name, argv, command))
File "/venv/lib/python3.8/site-packages/celery/bin/base.py", line 428, in parse_options
self.parser = self.create_parser(prog_name, command)
File "/venv/lib/python3.8/site-packages/celery/bin/base.py", line 440, in create_parser
description=self._format_description(self.description),
File "/venv/lib/python3.8/site-packages/celery/bin/base.py", line 462, in _format_description
text.fill_paragraphs(text.dedent(description), width))
File "/venv/lib/python3.8/site-packages/celery/utils/text.py", line 58, in fill_paragraphs
return sep.join(fill(p, width) for p in s.split(sep))
File "/venv/lib/python3.8/site-packages/celery/utils/text.py", line 58, in <genexpr>
return sep.join(fill(p, width) for p in s.split(sep))
File "/usr/lib/python3.8/textwrap.py", line 391, in fill
return w.fill(text)
File "/usr/lib/python3.8/textwrap.py", line 363, in fill
return "\n".join(self.wrap(text))
File "/usr/lib/python3.8/textwrap.py", line 354, in wrap
return self._wrap_chunks(chunks)
File "/usr/lib/python3.8/textwrap.py", line 248, in _wrap_chunks
raise ValueError("invalid width %r (must be > 0)" % self.width)
ValueError: invalid width -2 (must be > 0)
Исправление
Перед запуском команды в консоли запустить эту:
export COLUMNS=80