dmulyalin / salt-nornir

SALTSTACK Nornir based proxy minion, execution, state and runner modules
MIT License
27 stars 3 forks source link

[bug?] Unable to get progress=bars working even with env vars exported #38

Open bodleytunes opened 1 year ago

bodleytunes commented 1 year ago

Hi,

Trying progress=bars but unable to get it working as it will always fail as per below:

PYTHONIOENCODING=utf-8 export PYTHONIOENCODING && salt-run nr.event progress=bars
/home/.venv/lib/python3.9/site-packages/salt/utils/event.py:124: DeprecationWarning: The 'transport' kwarg has been deprecated and it will be removed in the Chlorine release, as such, its usage is no longer required.
  salt.utils.versions.warn_until(
03-Sep-2023 14:00:45.147:root:415b90ce9aa26575035c:state.nr.workflow.deploy_syslog.b…  task:scrapli_send_commands                         P…
03-Sep-2023 14:00:48.636:root:415b90ce9aa26575035c:state.nr.workflow.deploy_syslog.b…  subtask:show configuration                         P…
03-Sep-2023 14:00:52.909:None:None:exec.nr.cli                                         task:scrapli_send_commands                         P…
03-Sep-2023 14:00:58.682:None:None:exec.nr.cli                                         subtask:show configuration system syslog | displa… P…

Passed invalid arguments: startswith first arg must be str or a tuple of str, not NoneType

Usage:

    Function to listen to events emitted by Nornir Proxy Minions. Matched
    event printed to terminal.

    :param tag: (str) tag regex string, default is ``nornir\-proxy/.*``
    :param jid: (int, str) Job ID to listen events for, default is ``all``
    :param progress: (str) progress display mode - ``log``, ``raw``, ``bars``, ``tree``
    :param stop_signal: (obj) thread Event object, stops listening to events if ``stop_signal.is_set()``,
        if ``stop_signal is None``, listens and print events until keyboard interrupt hit - ``ctrl+c``

    ``bars`` and ``tree`` progress display modes use Rich library, to properly display various
    symbols and characters need to make sure to use utf-8 encoding for your environment for example
    by running these commands::

        [root@salt-master ~]# PYTHONIOENCODING=utf-8
        [root@salt-master ~]# export PYTHONIOENCODING

root@salt-master-staging-3006