Nekmo / amazon-dash

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

Trouble installing on os x #117

Closed Vernal closed 5 years ago

Vernal commented 5 years ago

Put an x into all the boxes [ ] relevant to your issue (like this: [x])

What is the purpose of your issue?

Guideline for bug reports

You can delete this section if your report is not a bug

How to get your version:

amazon-dash --version
python --version
pip --version
easy_install --version

Description

I'm having trouble installing. Maybe someone has gotten past this. When running sudo python -m amazon.dash install things fail. Immediately I get a ps: illegal option error:

Executing all install scripts for Amazon-Dash [OK] config has been installed successfully ps: illegal option -- - usage: ps [-AaCcEefhjlMmrSTvwXx] [-O fmt | -o fmt] [-G gid[,gid...]] [-g grp[,grp...]] [-u [uid,uid...]] [-p pid[,pid...]] [-t tty[,tty...]] [-U user[,user...]] ps [-L] Traceback (most recent call last): File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main "main", fname, loader, pkg_name) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/Users/jason/Library/Python/2.7/lib/python/site-packages/amazon_dash/install/main.py", line 3, in catch(cli)() File "/Users/jason/Library/Python/2.7/lib/python/site-packages/amazon_dash/install/init.py", line 47, in wrap return fn(*args, kwargs) File "/Library/Python/2.7/site-packages/click/core.py", line 764, in call return self.main(args, kwargs) File "/Library/Python/2.7/site-packages/click/core.py", line 717, in main rv = self.invoke(ctx) File "/Library/Python/2.7/site-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/Library/Python/2.7/site-packages/click/core.py", line 956, in invoke return ctx.invoke(self.callback, ctx.params) File "/Library/Python/2.7/site-packages/click/core.py", line 555, in invoke return callback(args, kwargs) File "/Users/jason/Library/Python/2.7/lib/python/site-packages/amazon_dash/install/init.py", line 152, in all has_service = has_service or (service().install() and File "/Users/jason/Library/Python/2.7/lib/python/site-packages/amazon_dash/install/init.py", line 71, in install self.is_installable() File "/Users/jason/Library/Python/2.7/lib/python/site-packages/amazon_dash/install/init.py", line 107, in is_installable if get_init_system() != 'systemd' or not get_systemd_services_path(): File "/Users/jason/Library/Python/2.7/lib/python/site-packages/amazon_dash/install/init.py", line 30, in get_init_system return check_output(['ps', '--no-headers', '-o', 'comm', '1']).strip(b'\n ').decode('utf-8') File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 573, in check_output raise CalledProcessError(retcode, cmd, output=output) subprocess.CalledProcessError: Command '['ps', '--no-headers', '-o', 'comm', '1']' returned non-zero exit status 1

tduane commented 5 years ago

removing '--no-headers' as an argument for the ps command in the init.py file resolved this error for me.

Nekmo commented 5 years ago

Solved in the development version.