Il 15/04/19 21:37, Sébastien Delafond ha scritto:

> Could you be kind enough to include the error/traceback you get ?

Sure, this is what I get if I install py3status on a system without file(1):


===8<===8<===8<===8<===8<===8<===8<===8<===8<===8<===8<===8<===8<===
root@616f5630d4f8:/# py3status -d -l /tmp/ciao
root@616f5630d4f8:/# cat /tmp/ciao
2019-04-15 20:06:00 INFO ========
2019-04-15 20:06:00 INFO Starting py3status version 3.14 python 3.7.3rc1
2019-04-15 20:06:00 INFO py3status started with config
{'minimum_interval': 0.1, 'include_paths': ['/root/.i3/py3status/',
'/root/.config/i3/py3status/', '/root/.config/i3status/py3status',
'/root/.config/i3/py3status'], 'version': '3.14', 'cache_timeout': 60,
'debug': True, 'dbus_notify': False, 'gevent': False, 'interval': 1,
'log_file': '/tmp/ciao', 'standalone': False, 'i3status_config_path':
'/etc/i3status.conf', 'disable_click_events': False}
2019-04-15 20:06:00 WARNING Setup error (FileNotFoundError)
parse_config.py line 721.
2019-04-15 20:06:00 INFO Traceback
FileNotFoundError: [Errno 2] No such file or directory: 'file': 'file'
  File "/usr/lib/python3/dist-packages/py3status/__init__.py", line 45,
in main
    py3.setup()
  File "/usr/lib/python3/dist-packages/py3status/core.py", line 599, in
setup
    self.config["py3_config"] = process_config(config_path, self)
  File "/usr/lib/python3/dist-packages/py3status/parse_config.py", line
721, in process_config
    ["file", "-b", "--mime-encoding", "--dereference", config_path]
  File "/usr/lib/python3.7/subprocess.py", line 395, in check_output
    **kwargs).stdout
  File "/usr/lib/python3.7/subprocess.py", line 472, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.7/subprocess.py", line 775, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.7/subprocess.py", line 1522, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)

2019-04-15 20:06:00 ERROR py3status: Setup error (FileNotFoundError)
parse_config.py line 721. Please try to fix this and reload i3wm
(Mod+Shift+R)
===8<===8<===8<===8<===8<===8<===8<===8<===8<===8<===8<===8<===8<===

around parse_config.py@721:

===8<===8<===8<===8<===8<===8<===8<===8<===8<===8<===8<===8<===8<===
    # get the file encoding this is important with multi-byte unicode chars
    try:
        encoding = check_output(
            ["file", "-b", "--mime-encoding", "--dereference", config_path]
        )
        encoding = encoding.strip().decode("utf-8")
===8<===8<===8<===8<===8<===8<===8<===8<===8<===8<===8<===8<===8<===

HTH, ciao

-- 
aogier

Reply via email to