huggingface / huggingface/knockknock

Does not work when running code remotely

Open
#14 4 comments 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
Python
Stars
2.8k
Forks
223
PR merge metrics
No merged PRs in 30d

Description

I am running my code through SSH. My connecting device is a Windows 10 computer, and the machine actually doing the training is a linux server. When I use knockknock, though, I get the following trace.

```
Traceback (most recent call last):
File "/home/bram/.local/share/virtualenvs/predicting-syntactic-equivalence-g0sIkWgJ/lib/python3.7/site-packages/secretstorage/util.py", line 47, in send_and_get_reply
return self._connection.send_and_get_reply(msg)
File "/home/bram/.local/share/virtualenvs/predicting-syntactic-equivalence-g0sIkWgJ/lib/python3.7/site-packages/jeepney/integrate/blocking.py", line 69, in send_and_get_reply
return future.result()
File "/home/bram/.local/share/virtualenvs/predicting-syntactic-equivalence-g0sIkWgJ/lib/python3.7/site-packages/jeepney/integrate/blocking.py", line 31, in result
raise value
jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.UnknownMethod] ("No such interface 'org.freedesktop.DBus.Properties' on object at path /org/freedesktop/secrets/collection/login",)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/bram/.local/share/virtualenvs/predicting-syntactic-equivalence-g0sIkWgJ/lib/python3.7/site-packages/secretstorage/collection.py", line 161, in get_default_collection
return Collection(connection)
File "/home/bram/.local/share/virtualenvs/predicting-syntactic-equivalence-g0sIkWgJ/lib/python3.7/site-packages/secretstorage/collection.py", line 44, in __init__
self._collection.get_property('Label')
File "/home/bram/.local/share/virtualenvs/predicting-syntactic-equivalence-g0sIkWgJ/lib/python3.7/site-packages/secretstorage/util.py", line 65, in get_property
(signature, value), = self.send_and_get_reply(msg)
File "/home/bram/.local/share/virtualenvs/predicting-syntactic-equivalence-g0sIkWgJ/lib/python3.7/site-packages/secretstorage/util.py", line 50, in send_and_get_reply
raise ItemNotFoundException('Item does not exist!') from resp
secretstorage.exceptions.ItemNotFoundException: Item does not exist!

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/bram/.local/share/virtualenvs/predicting-syntactic-equivalence-g0sIkWgJ/lib/python3.7/site-packages/keyring/backends/SecretService.py", line 55, in get_preferred_collection
collection = secretstorage.get_default_collection(bus)
File "/home/bram/.local/share/virtualenvs/predicting-syntactic-equivalence-g0sIkWgJ/lib/python3.7/site-packages/secretstorage/collection.py", line 164, in get_default_collection
'default', session)
File "/home/bram/.local/share/virtualenvs/predicting-syntactic-equivalence-g0sIkWgJ/lib/python3.7/site-packages/secretstorage/collection.py", line 145, in create_collection
raise PromptDismissedException('Prompt dismissed.')
secretstorage.exceptions.PromptDismissedException: Prompt dismissed.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "ml_s2v.py", line 173, in
trainer.train_model(options)
File "/home/bram/.local/share/virtualenvs/predicting-syntactic-equivalence-g0sIkWgJ/lib/python3.7/site-packages/knockknock/email_sender.py", line 50, in wrapper_sender
yag_sender.send(recipient_email, 'Training has started 🎬', contents)
File "/home/bram/.local/share/virtualenvs/predicting-syntactic-equivalence-g0sIkWgJ/lib/python3.7/site-packages/yagmail/sender.py", line 147, in send
self.login()
File "/home/bram/.local/share/virtualenvs/predicting-syntactic-equivalence-g0sIkWgJ/lib/python3.7/site-packages/yagmail/sender.py", line 246, in login
self._login(self.credentials)
File "/home/bram/.local/share/virtualenvs/predicting-syntactic-equivalence-g0sIkWgJ/lib/python3.7/site-packages/yagmail/sender.py", line 203, in _login
password = self.handle_password(self.user, password)
File "/home/bram/.local/share/virtualenvs/predicting-syntactic-equivalence-g0sIkWgJ/lib/python3.7/site-packages/yagmail/sender.py", line 209, in handle_password
return handle_password(user, password)
File "/home/bram/.local/share/virtualenvs/predicting-syntactic-equivalence-g0sIkWgJ/lib/python3.7/site-packages/yagmail/password.py", line 11, in handle_password
password = keyring.get_password("yagmail", user)
File "/home/bram/.local/share/virtualenvs/predicting-syntactic-equivalence-g0sIkWgJ/lib/python3.7/site-packages/keyring/core.py", line 55, in get_password
return _keyring_backend.get_password(service_name, username)
File "/home/bram/.local/share/virtualenvs/predicting-syntactic-equivalence-g0sIkWgJ/lib/python3.7/site-packages/keyring/backends/SecretService.py", line 67, in get_password
collection = self.get_preferred_collection()
File "/home/bram/.local/share/virtualenvs/predicting-syntactic-equivalence-g0sIkWgJ/lib/python3.7/site-packages/keyring/backends/SecretService.py", line 57, in get_preferred_collection
raise InitError("Failed to create the collection: %s." % e)
keyring.errors.InitError: Failed to create the collection: Prompt dismissed..
```

It states "Item does not exist" but I'm not sure which item it's referring to. This happens as soon as I launch the code, so I haven't been prompted for a password. In fact, it seems that the prompt is where things go wrong.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with knockknock/email_sender.py and the traceback path through yagmail, keyring, and SecretService; compare this with the SSH/Linux execution environment described in the report. Reproduce the failure using the reported setup and determine the expected password-prompt behavior. Done means remote execution no longer fails at notification startup, with the issue or its cause documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, python
Domain
backend, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.