Utilizo Pushbullet CLI para enviar notificaciones Pushbullet desde la terminal. Funciona bien cuando lo ejecuto localmente, pero cuando hago SSH en la máquina donde está instalado e intento enviar una notificación, obtengo un seguimiento de Python:
% pb push test
Traceback (most recent call last):
File "/Users/db/Library/Python/3.11/lib/python/site-packages/keyring/backends/macOS/__init__.py", line 51, in get_password
return api.find_generic_password(self.keychain, service, username)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/db/Library/Python/3.11/lib/python/site-packages/keyring/backends/macOS/api.py", line 144, in find_generic_password
Error.raise_for_status(status)
File "/Users/db/Library/Python/3.11/lib/python/site-packages/keyring/backends/macOS/api.py", line 114, in raise_for_status
raise cls(status, "Unknown Error")
keyring.backends.macOS.api.Error: (-25308, 'Unknown Error')
Durante el manejo de la excepción anterior, ocurrió otra excepción:
Traceback (most recent call last):
File "/Users/db/Library/Python/3.11/bin/pb", line 8, in
sys.exit(main())
^^^^^^
File "/Users/db/Library/Python/3.11/lib/python/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/db/Library/Python/3.11/lib/python/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/Users/db/Library/Python/3.11/lib/python/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/db/Library/Python/3.11/lib/python/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/db/Library/Python/3.11/lib/python/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/db/Library/Python/3.11/lib/python/site-packages/pushbullet_cli/app.py", line 239, in push
_push(**kwargs)
File "/Users/db/Library/Python/3.11/lib/python/site-packages/pushbullet_cli/app.py", line 63, in _push
pb = _get_pb()
^^^^^^^^^
File "/Users/db/Library/Python/3.11/lib/python/site-packages/pushbullet_cli/app.py", line 47, in _get_pb
password = keyring.get_password("pushbullet", "cli")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/db/Library/Python/3.11/lib/python/site-packages/keyring/core.py", line 55, in get_password
return get_keyring().get_password(service_name, username)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/db/Library/Python/3.11/lib/python/site-packages/keyring/backends/chainer.py", line 51, in get_password
password = keyring.get_password(service, username)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/db/Library/Python/3.11/lib/python/site-packages/keyring/backends/macOS/__init__.py", line 57, in get_password
raise KeyringError("Can't get password from keychain: " "{}".format(e))
keyring.errors.KeyringError: Can't get password from keychain: (-25308, 'Unknown Error')
Supongo que el problema es que la shell que obtengo al hacer SSH es diferente de una shell local, pero ¿cómo lo arreglo?