##I am getting the same error when trying to login with Token as well as with User name and password **medperf auth synapse_login** MedPerf 0.1.0 How do you want to login? [1] Personal Access Token [2] Username and Password Select an option (1 or 2): 2 username: Aayush2003Gupta password: ╭───────────────────────── Traceback (most recent call last) ─────────────────────────╮ │ /home/ubuntu/aashray/mlcube/medperf/cli/medperf/decorators.py:44 in wrapper │ │ │ │ 41 │ │ except Exception as e: │ │ 42 │ │ │ logging.error("An unexpected error occured. Terminating.") │ │ 43 │ │ │ logging.exception(e) │ │ ❱ 44 │ │ │ raise e │ │ 45 │ │ finally: │ │ 46 │ │ │ cleanup() │ │ 47 │ │ │ │ ╭─────────────────────────── locals ───────────────────────────╮ │ │ │ args = () │ │ │ │ func = │ │ │ │ kwargs = {'username': None, 'password': None, 'token': None} │ │ │ ╰──────────────────────────────────────────────────────────────╯ │ │ │ │ /home/ubuntu/aashray/mlcube/medperf/cli/medperf/decorators.py:33 in wrapper │ │ │ │ 30 │ def wrapper(*args, **kwargs): │ │ 31 │ │ try: │ │ 32 │ │ │ logging.info(f"Running function '{func.__name__}'") │ │ ❱ 33 │ │ │ func(*args, **kwargs) │ │ 34 │ │ except CleanExit as e: │ │ 35 │ │ │ logging.info(str(e)) │ │ 36 │ │ │ config.ui.print(str(e)) │ │ │ │ ╭─────────────────────────── locals ───────────────────────────╮ │ │ │ args = () │ │ │ │ func = │ │ │ │ kwargs = {'username': None, 'password': None, 'token': None} │ │ │ ╰──────────────────────────────────────────────────────────────╯ │ │ │ │ /home/ubuntu/aashray/mlcube/medperf/cli/medperf/commands/auth/auth.py:28 in │ │ synapse_login │ │ │ │ 25 │ """Login to the synapse server. │ │ 26 │ Provide either a username and a password, or a token │ │ 27 │ """ │ │ ❱ 28 │ SynapseLogin.run(username=username, password=password, token=token) │ │ 29 │ config.ui.print("✅ Done!") │ │ 30 │ │ 31 │ │ │ │ ╭──── locals ─────╮ │ │ │ password = None │ │ │ │ token = None │ │ │ │ username = None │ │ │ ╰─────────────────╯ │ │ │ │ /home/ubuntu/aashray/mlcube/medperf/cli/medperf/commands/auth/synapse_login.py:21 │ │ in run │ │ │ │ 18 │ │ │ if method == "1": │ │ 19 │ │ │ │ cls.login_with_token() │ │ 20 │ │ │ elif method == "2": │ │ ❱ 21 │ │ │ │ cls.login_with_password() │ │ 22 │ │ │ else: │ │ 23 │ │ │ │ raise InvalidArgumentError("Invalid input. Select either numbe │ │ 24 │ │ else: │ │ │ │ ╭──────────────────────────────────── locals ─────────────────────────────────────╮ │ │ │ cls = │ │ │ │ method = '2' │ │ │ │ msg = 'How do you want to login?\n[1] Personal Access Token\n[2] Username │ │ │ │ and Password\nSe'+25 │ │ │ │ password = None │ │ │ │ token = None │ │ │ │ username = None │ │ │ ╰─────────────────────────────────────────────────────────────────────────────────╯ │ │ │ │ /home/ubuntu/aashray/mlcube/medperf/cli/medperf/commands/auth/synapse_login.py:43 │ │ in login_with_password │ │ │ │ 40 │ │ │ │ 41 │ │ syn = synapseclient.Synapse() │ │ 42 │ │ try: │ │ ❱ 43 │ │ │ syn.login(username, password, rememberMe=True) │ │ 44 │ │ except SynapseAuthenticationError: │ │ 45 │ │ │ raise CommunicationAuthenticationError("Invalid Synapse credential │ │ 46 │ │ │ │ ╭─────────────────────────────── locals ────────────────────────────────╮ │ │ │ cls = │ │ │ │ password = 'PgVg2003*' │ │ │ │ syn = │ │ │ │ username = 'Aayush2003Gupta' │ │ │ ╰───────────────────────────────────────────────────────────────────────╯ │ │ │ │ /home/ubuntu/anaconda/envs/cube/lib/python3.9/site-packages/synapseclient/client.py │ │ :432 in login │ │ │ │ 429 │ │ │ │ 430 │ │ # Save the API key in the cache │ │ 431 │ │ if rememberMe: │ │ ❱ 432 │ │ │ delete_stored_credentials(self.credentials.username) │ │ 433 │ │ │ self.credentials.store_to_keyring() │ │ 434 │ │ │ cached_sessions.set_most_recent_user(self.credentials.username) │ │ 435 │ │ │ │ ╭──────────────────────────────────── locals ─────────────────────────────────────╮ │ │ │ apiKey = None │ │ │ │ authToken = None │ │ │ │ credential_provider_chain = │ │ │ │ email = 'Aayush2003Gupta' │ │ │ │ forced = False │ │ │ │ password = 'PgVg2003*' │ │ │ │ rememberMe = True │ │ │ │ self = │ │ │ │ sessionToken = None │ │ │ │ silent = False │ │ │ ╰─────────────────────────────────────────────────────────────────────────────────╯ │ │ │ │ /home/ubuntu/anaconda/envs/cube/lib/python3.9/site-packages/synapseclient/core/cred │ │ entials/cred_data.py:190 in delete_stored_credentials │ │ │ │ 187 │ Delete all credentials stored to the keyring. │ │ 188 │ """ │ │ 189 │ for credential_cls in (SynapseApiKeyCredentials, SynapseAuthTokenCredenti │ │ ❱ 190 │ │ creds = credential_cls.get_from_keyring(username) │ │ 191 │ │ if creds: │ │ 192 │ │ │ creds.delete_from_keyring() │ │ 193 │ │ │ │ ╭──────────────────────────────────── locals ─────────────────────────────────────╮ │ │ │ credential_cls = 'SynapseCredentials': │ │ ❱ 35 │ │ secret = keyring.get_password(cls.get_keyring_service_name(), usernam │ │ 36 │ │ return cls(secret, username) if secret else None │ │ 37 │ │ │ 38 │ def delete_from_keyring(self): │ │ │ │ ╭──────────────────────────────────── locals ─────────────────────────────────────╮ │ │ │ cls = │ │ │ │ username = 'Aayush2003Gupta' │ │ │ ╰─────────────────────────────────────────────────────────────────────────────────╯ │ │ │ │ /home/ubuntu/anaconda/envs/cube/lib/python3.9/site-packages/keyring/core.py:55 in │ │ get_password │ │ │ │ 52 │ │ 53 def get_password(service_name: str, username: str) -> typing.Optional[str]: │ │ 54 │ """Get password from the specified service.""" │ │ ❱ 55 │ return get_keyring().get_password(service_name, username) │ │ 56 │ │ 57 │ │ 58 def set_password(service_name: str, username: str, password: str) -> None: │ │ │ │ ╭────────────── locals ───���───────────╮ │ │ │ service_name = 'SYNAPSE.ORG_CLIENT' │ │ │ │ username = 'Aayush2003Gupta' │ │ │ ╰─────────────────────────────────────╯ │ │ │ │ /home/ubuntu/anaconda/envs/cube/lib/python3.9/site-packages/keyring/backends/chaine │ │ r.py:51 in get_password │ │ │ │ 48 │ │ │ 49 │ def get_password(self, service, username): │ │ 50 │ │ for keyring in self.backends: │ │ ❱ 51 │ │ │ password = keyring.get_password(service, username) │ │ 52 │ │ │ if password is not None: │ │ 53 │ │ │ │ return password │ │ 54 │ │ │ │ ╭─────────────────────────────────── locals ────────────────────────────────────╮ │ │ │ keyring = │ │ │ │ self = │ │ │ │ service = 'SYNAPSE.ORG_CLIENT' │ │ │ │ username = 'Aayush2003Gupta' │ │ │ ╰───────────────────────────────────────────────────────────────────────────────╯ │ │ │ │ /home/ubuntu/anaconda/envs/cube/lib/python3.9/site-packages/keyring/backends/Secret │ │ Service.py:78 in get_password │ │ │ │ 75 │ │ │ 76 │ def get_password(self, service, username): │ │ 77 │ │ """Get password of the username for the service""" │ │ ❱ 78 │ │ collection = self.get_preferred_collection() │ │ 79 │ │ with closing(collection.connection): │ │ 80 │ │ │ items = collection.search_items({"username": username, "service": │ │ 81 │ │ │ for item in items: │ │ │ │ ╭─────────────────────────────────── locals ───────────────────────────────────╮ │ │ │ self = │ │ │ │ service = 'SYNAPSE.ORG_CLIENT' │ │ │ │ username = 'Aayush2003Gupta' │ │ │ ╰──────────────────────────────────────────────────────────────────────────────╯ │ │ │ │ /home/ubuntu/anaconda/envs/cube/lib/python3.9/site-packages/keyring/backends/Secret │ │ Service.py:67 in get_preferred_collection │ │ │ │ 64 │ │ if collection.is_locked(): │ │ 65 │ │ │ collection.unlock() │ │ 66 │ │ │ if collection.is_locked(): # User dismissed the prompt │ │ ❱ 67 │ │ │ │ raise KeyringLocked("Failed to unlock the collection!") │ │ 68 │ │ return collection │ │ 69 │ │ │ 70 │ def unlock(self, item): │ │ │ │ ╭──────────────────────────────────── locals ────────────────────────────────────╮ │ │ │ bus = │ │ │ │ collection = │ │ │ │ self = │ │ │ ╰───────────��────────────────────────────────────────────────────────────────────╯ │ ╰─────────────────────────────────────────────────────────────────────────────────────╯ **KeyringLocked: Failed to unlock the collection!** @vchung @ujjwalbaid

Created by Sourav Saini SouravSaini
@hasank, Unfortunately, I have not come across this message. I tried to reproduce the error, but was unable to, even on a fresh VM. @SouravSaini , can you provide a little more context about your environment? e.g. python version, conda version, etc.
@vchung Have you seen this error before? MedPerf uses `synapseclient==2.7.0`
Hi, I was also getting the same error. I solved it using synapse config
I am using the following command to run the test of mlcube ``` PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring medperf auth synapse_login \ && PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring medperf test run --demo_dataset_url synapse:syn52276402 --demo_dataset_hash "16526 \ 543134396b0c8fd0f0428be7c96f2142a66" -p ./test_mlcubes/prep_segmentation -m ./nnunet_met/mlcube/ -e ./test_mlcubes/eval_segmentation --offline --no-cache ``` I am getting the following output ``` MedPerf 0.1.0 How do you want to login? [1] Personal Access Token [2] Username and Password Select an option (1 or 2): 1 access token: Welcome, SAHAJ MISTRY! ✅ Done! MedPerf 0.1.0 Retrieving Model cube > Model cube download complete Retrieving Evaluator cube > Evaluator cube download complete ❌ There was an attempt to download resources from the Synapse platform, but couldn't find Synapse credentials. Did you run 'medperf auth synapse_login' before?. ``` @hasank @ujjwalbaid
@SouravSaini Was your issue resolved?
I solved this issue by setting environment variable PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring

[ERROR] : medperf auth synapse_login page is loading…