salt
salt copied to clipboard
--out progress not working
Description of Issue
Output progress not working => https://docs.saltstack.com/en/latest/ref/output/all/salt.output.progress.html
Steps to Reproduce Issue
sudo pip install --user progressbar
sudo salt-call state.apply --out progress
[ERROR ] Nested output failed:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/salt/output/__init__.py", line 49, in try_printout
printout = get_printout('nested', opts)(data, **kwargs)
TypeError: output() takes exactly 2 arguments (1 given)
[ERROR ] An un-handled exception was caught by salt's global exception handler:
TypeError: output() takes exactly 2 arguments (1 given)
Traceback (most recent call last):
File "/usr/bin/salt-call", line 11, in <module>
salt_call()
File "/usr/lib/python2.7/site-packages/salt/scripts.py", line 431, in salt_call
client.run()
File "/usr/lib/python2.7/site-packages/salt/cli/call.py", line 57, in run
caller.run()
File "/usr/lib/python2.7/site-packages/salt/cli/caller.py", line 154, in run
_retcode=ret.get('retcode', 0))
File "/usr/lib/python2.7/site-packages/salt/output/__init__.py", line 96, in display_output
display_data = try_printout(data, out, opts, **kwargs)
File "/usr/lib/python2.7/site-packages/salt/output/__init__.py", line 54, in try_printout
printout = get_printout('raw', opts)(data, **kwargs)
TypeError: output() takes exactly 2 arguments (1 given)
Traceback (most recent call last):
File "/usr/bin/salt-call", line 11, in <module>
salt_call()
File "/usr/lib/python2.7/site-packages/salt/scripts.py", line 431, in salt_call
client.run()
File "/usr/lib/python2.7/site-packages/salt/cli/call.py", line 57, in run
caller.run()
File "/usr/lib/python2.7/site-packages/salt/cli/caller.py", line 154, in run
_retcode=ret.get('retcode', 0))
File "/usr/lib/python2.7/site-packages/salt/output/__init__.py", line 96, in display_output
display_data = try_printout(data, out, opts, **kwargs)
File "/usr/lib/python2.7/site-packages/salt/output/__init__.py", line 54, in try_printout
printout = get_printout('raw', opts)(data, **kwargs)
TypeError: output() takes exactly 2 arguments (1 given)
Versions Report
Salt Version:
Salt: 2019.2.0
Dependency Versions:
cffi: 1.11.5
cherrypy: Not Installed
dateutil: Not Installed
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.10.1
libgit2: 0.27.8
libnacl: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.6.1
mysql-python: Not Installed
pycparser: 2.14
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: 0.27.4
Python: 2.7.16 (default, Apr 30 2019, 15:54:43)
python-gnupg: Not Installed
PyYAML: 5.1
PyZMQ: 17.0.0
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 5.0.2
ZMQ: 4.3.1
System Versions:
dist: fedora 30 Thirty
locale: UTF-8
machine: x86_64
release: 5.2.9-200.fc30.x86_64
system: Linux
version: Fedora 30 Thirty
Although I can reproduce this, I'm not entirely sure why its failing. The widget isn't getting a chance to gen. Will look into this!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.
Thank you for updating this issue. It is no longer marked as stale.
@xeacott is this still an issue in master or 3003RC1?
Same issue here:
Salt Version:
Salt: 3003.1
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: 2.7.3
docker-py: Not Installed
gitdb: 2.0.6
gitpython: 3.0.7
Jinja2: 2.10.1
libgit2: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack: 0.6.2
msgpack-pure: Not Installed
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: Not Installed
pycryptodome: 3.6.1
pygit2: Not Installed
Python: 3.8.10 (default, Jun 2 2021, 10:49:15)
python-gnupg: 0.4.5
PyYAML: 5.3.1
PyZMQ: 18.1.1
smmap: 2.0.5
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.3.2
System Versions:
dist: ubuntu 20.04 focal
locale: utf-8
machine: x86_64
release: 5.4.0-80-generic
system: Linux
version: Ubuntu 20.04 focal
sudo aptitude show python3-progressbar
Package: python3-progressbar
Version: 2.5-2
State: installed
Automatically installed: no
Priority: optional
Section: universe/python
Maintainer: Ubuntu Developers <[email protected]>
Architecture: all
Uncompressed Size: 56.3 k
Depends: python3:any
Description: text progress bar library for Python (Python 3)
A text progress bar is typically used to display the progress of a long running operation, providing a visual cue that processing is underway.
The ProgressBar class manages the current progress, and the format of the line is given by a number of widgets. A widget is an object that may display differently depending on
the state of the progress bar. There are three types of widgets:
* a string, which always shows itself
* a ProgressBarWidget, which may return a different value every time its update method is called
* a ProgressBarWidgetHFill, which is like ProgressBarWidget, except it expands to fill the remaining width of the line.
This package contains the Python 3 version of progressbar.
Homepage: https://github.com/niltonvolpato/python-progressbar
sudo salt '*' test.ping --out=progress
[ERROR ] Nested output failed:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/salt/output/__init__.py", line 43, in try_printout
printout = get_printout(out, opts)(data, **kwargs)
File "/usr/lib/python3/dist-packages/salt/loader.py", line 1241, in __call__
return self.loader.run(run_func, *args, **kwargs)
File "/usr/lib/python3/dist-packages/salt/loader.py", line 2274, in run
return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
File "/usr/lib/python3/dist-packages/salt/loader.py", line 2289, in _run_as
return _func_or_method(*args, **kwargs)
TypeError: output() missing 1 required positional argument: 'bar'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/salt/output/__init__.py", line 49, in try_printout
printout = get_printout("nested", opts)(data, **kwargs)
File "/usr/lib/python3/dist-packages/salt/loader.py", line 1241, in __call__
return self.loader.run(run_func, *args, **kwargs)
File "/usr/lib/python3/dist-packages/salt/loader.py", line 2274, in run
return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
File "/usr/lib/python3/dist-packages/salt/loader.py", line 2289, in _run_as
return _func_or_method(*args, **kwargs)
TypeError: output() missing 1 required positional argument: 'bar'
[ERROR ] An un-handled exception was caught by salt's global exception handler:
TypeError: output() missing 1 required positional argument: 'bar'
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/salt/output/__init__.py", line 43, in try_printout
printout = get_printout(out, opts)(data, **kwargs)
File "/usr/lib/python3/dist-packages/salt/loader.py", line 1241, in __call__
return self.loader.run(run_func, *args, **kwargs)
File "/usr/lib/python3/dist-packages/salt/loader.py", line 2274, in run
return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
File "/usr/lib/python3/dist-packages/salt/loader.py", line 2289, in _run_as
return _func_or_method(*args, **kwargs)
TypeError: output() missing 1 required positional argument: 'bar'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/salt/output/__init__.py", line 49, in try_printout
printout = get_printout("nested", opts)(data, **kwargs)
File "/usr/lib/python3/dist-packages/salt/loader.py", line 1241, in __call__
return self.loader.run(run_func, *args, **kwargs)
File "/usr/lib/python3/dist-packages/salt/loader.py", line 2274, in run
return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
File "/usr/lib/python3/dist-packages/salt/loader.py", line 2289, in _run_as
return _func_or_method(*args, **kwargs)
TypeError: output() missing 1 required positional argument: 'bar'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/salt", line 11, in <module>
load_entry_point('salt==3003.1', 'console_scripts', 'salt')()
File "/usr/lib/python3/dist-packages/salt/scripts.py", line 539, in salt_main
client.run()
File "/usr/lib/python3/dist-packages/salt/cli/salt.py", line 204, in run
self._output_ret(ret_, out, retcode=retcode)
File "/usr/lib/python3/dist-packages/salt/cli/salt.py", line 407, in _output_ret
salt.output.display_output(ret, out=out, opts=self.config, _retcode=retcode)
File "/usr/lib/python3/dist-packages/salt/output/__init__.py", line 95, in display_output
display_data = try_printout(data, out, opts, **kwargs)
File "/usr/lib/python3/dist-packages/salt/output/__init__.py", line 54, in try_printout
printout = get_printout("raw", opts)(data, **kwargs)
File "/usr/lib/python3/dist-packages/salt/loader.py", line 1241, in __call__
return self.loader.run(run_func, *args, **kwargs)
File "/usr/lib/python3/dist-packages/salt/loader.py", line 2274, in run
return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
File "/usr/lib/python3/dist-packages/salt/loader.py", line 2289, in _run_as
return _func_or_method(*args, **kwargs)
TypeError: output() missing 1 required positional argument: 'bar'
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/salt/output/__init__.py", line 43, in try_printout
printout = get_printout(out, opts)(data, **kwargs)
File "/usr/lib/python3/dist-packages/salt/loader.py", line 1241, in __call__
return self.loader.run(run_func, *args, **kwargs)
File "/usr/lib/python3/dist-packages/salt/loader.py", line 2274, in run
return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
File "/usr/lib/python3/dist-packages/salt/loader.py", line 2289, in _run_as
return _func_or_method(*args, **kwargs)
TypeError: output() missing 1 required positional argument: 'bar'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/salt/output/__init__.py", line 49, in try_printout
printout = get_printout("nested", opts)(data, **kwargs)
File "/usr/lib/python3/dist-packages/salt/loader.py", line 1241, in __call__
return self.loader.run(run_func, *args, **kwargs)
File "/usr/lib/python3/dist-packages/salt/loader.py", line 2274, in run
return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
File "/usr/lib/python3/dist-packages/salt/loader.py", line 2289, in _run_as
return _func_or_method(*args, **kwargs)
TypeError: output() missing 1 required positional argument: 'bar'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/salt", line 11, in <module>
load_entry_point('salt==3003.1', 'console_scripts', 'salt')()
File "/usr/lib/python3/dist-packages/salt/scripts.py", line 539, in salt_main
client.run()
File "/usr/lib/python3/dist-packages/salt/cli/salt.py", line 204, in run
self._output_ret(ret_, out, retcode=retcode)
File "/usr/lib/python3/dist-packages/salt/cli/salt.py", line 407, in _output_ret
salt.output.display_output(ret, out=out, opts=self.config, _retcode=retcode)
File "/usr/lib/python3/dist-packages/salt/output/__init__.py", line 95, in display_output
display_data = try_printout(data, out, opts, **kwargs)
File "/usr/lib/python3/dist-packages/salt/output/__init__.py", line 54, in try_printout
printout = get_printout("raw", opts)(data, **kwargs)
File "/usr/lib/python3/dist-packages/salt/loader.py", line 1241, in __call__
return self.loader.run(run_func, *args, **kwargs)
File "/usr/lib/python3/dist-packages/salt/loader.py", line 2274, in run
return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
File "/usr/lib/python3/dist-packages/salt/loader.py", line 2289, in _run_as
return _func_or_method(*args, **kwargs)
TypeError: output() missing 1 required positional argument: 'bar'
Yes this is still an issue. A few of the other outputters aren't working either, such as table. Not sure if this is something I'll be able to get to for Silicon as its lower on our list. But perhaps... there is someone I can reach out to about this specific outputter.
Update. Me and another dev have made progress.
Not sure why this is low severity?
The outputter is completely broken and there is no workaround. It should be high, as it was originally.
Hi,
any updates on this? I just noticed this as well upon using salt --output=progress
on 3004:
Traceback (most recent call last):
File "/usr/bin/salt", line 9, in <module>
salt_main()
File "/usr/lib/python3.6/site-packages/salt/scripts.py", line 521, in salt_main
client.run()
File "/usr/lib/python3.6/site-packages/salt/cli/salt.py", line 204, in run
self._output_ret(ret_, out, retcode=retcode)
File "/usr/lib/python3.6/site-packages/salt/cli/salt.py", line 407, in _output_ret
salt.output.display_output(ret, out=out, opts=self.config, _retcode=retcode)
File "/usr/lib/python3.6/site-packages/salt/output/__init__.py", line 88, in display_output
display_data = try_printout(data, out, opts, **kwargs)
File "/usr/lib/python3.6/site-packages/salt/output/__init__.py", line 47, in try_printout
printout = get_printout("raw", opts)(data, **kwargs)
File "/usr/lib/python3.6/site-packages/salt/loader/lazy.py", line 149, in __call__
return self.loader.run(run_func, *args, **kwargs)
File "/usr/lib/python3.6/site-packages/salt/loader/lazy.py", line 1203, in run
return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
File "/usr/lib/python3.6/site-packages/contextvars/__init__.py", line 38, in run
return callable(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/salt/loader/lazy.py", line 1218, in _run_as
return _func_or_method(*args, **kwargs)
TypeError: output() missing 1 required positional argument: 'bar'
I'm able to replicate this on the head of master.