Nekmo / amazon-dash

Hack your Amazon Dash to run what you want.
MIT License
829 stars 67 forks source link

Error running service in Raspbian #53

Closed etatus closed 6 years ago

etatus commented 6 years ago

Description

"sudo amazon-dash" works fine, but there is an error trying to run the service:

> sudo systemctl start amazon-dash
Failed to start amazon-dash.service: Unit amazon-dash.service failed to load: No such file or directory.

What I Did

There was an error on installation (I guess it has something to do):

> sudo python -m amazon_dash.install
Executing all install scripts for Amazon-Dash
[OK] config has been installed successfully
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/local/lib/python2.7/dist-packages/amazon_dash/install/__main__.py", line 3, in <module>
    catch(cli)()
  File "/usr/local/lib/python2.7/dist-packages/amazon_dash/install/__init__.py", line 35, in wrap
    return fn(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/amazon_dash/install/__init__.py", line 140, in all
    has_service = has_service or (service().install() and
  File "/usr/local/lib/python2.7/dist-packages/amazon_dash/install/__init__.py", line 59, in install
    self.is_installable()
  File "/usr/local/lib/python2.7/dist-packages/amazon_dash/install/__init__.py", line 95, in is_installable
    if not get_pid('systemd') or not get_systemd_services_path():
  File "/usr/local/lib/python2.7/dist-packages/amazon_dash/install/__init__.py", line 21, in get_pid
    return check_output(["pidof", name])
  File "/usr/lib/python2.7/subprocess.py", line 573, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['pidof', 'systemd']' returned non-zero exit status 1
Nekmo commented 6 years ago

This is a bug in Debian/Ubunu latest releases. The error is resolved in the development branch.

https://github.com/Nekmo/amazon-dash/issues/52 https://github.com/Nekmo/amazon-dash/issues/48 https://github.com/Nekmo/amazon-dash/issues/48

Nekmo commented 6 years ago

A new release fix this bug on Ubuntu/Debian.

pip install -U amazon-dash
etatus commented 6 years ago

It works like a charm, great job!

And thank you so much for this utility, it's really amazing! :)

Nekmo commented 6 years ago

Thank you. You are welcome :)