{"record":{"id":"837c4723390e0489","repo":"yt-dlp/yt-dlp","slug":"invalid-password-837c47","errorCode":null,"errorMessage":"Invalid password","messagePattern":"Invalid password","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"yt_dlp/extractor/playsuisse.py","lineNumber":207,"sourceCode":"                    'request_id': request_id,\n                    'medium_id': 'PASSWORD',\n                    'type': 'password',\n                    'identifier': username,\n                }).encode())['data']['exchange_id']['exchange_id']\n        except ExtractorError:\n            raise ExtractorError('Invalid username', expected=True)\n\n        try:\n            login_data = self._download_json(\n                f'{self._LOGIN_BASE}/verification-srv/v2/authenticate/authenticate/password', None,\n                'Submitting password', headers={'content-type': 'application/json'}, data=json.dumps({\n                    'requestId': request_id,\n                    'exchange_id': exchange_id,\n                    'type': 'password',\n                    'password': password,\n                }).encode())['data']\n        except ExtractorError:\n            raise ExtractorError('Invalid password', expected=True)\n\n        authorization_code = parse_qs(self._request_webpage(\n            f'{self._LOGIN_BASE}/login-srv/verification/login', None, 'Logging in',\n            data=urlencode_postdata({\n                'requestId': request_id,\n                'exchange_id': login_data['exchange_id']['exchange_id'],\n                'verificationType': 'password',\n                'sub': login_data['sub'],\n                'status_id': login_data['status_id'],\n                'rememberMe': True,\n                'lat': '',\n                'lon': '',\n            })).url)['code'][0]\n\n        self._ID_TOKEN = self._download_json(\n            f'{self._LOGIN_BASE}/proxy/token', None, 'Downloading token', data=b'', query={\n                'client_id': self._CLIENT_ID,\n                'redirect_uri': 'https://www.playsuisse.ch/auth',","sourceCodeStart":189,"sourceCodeEnd":225,"githubUrl":"https://github.com/yt-dlp/yt-dlp/blob/81ecd58b1394793e6da9998cc19fdb45657f1685/yt_dlp/extractor/playsuisse.py#L189-L225","documentation":"PlaySuisseIE._perform_login (yt_dlp/extractor/playsuisse.py:207) performs the second auth step, POSTing the password to {LOGIN_BASE}/verification-srv/v2/authenticate/authenticate/password. Any ExtractorError from that call is re-labelled 'Invalid password' (expected=True); like the username step, the catch-all also hides network or schema errors behind this message.","triggerScenarios":"The username step succeeded (a valid exchange_id was obtained) but the password submission failed: wrong password for a known account, or a transient/structural failure in the authenticate/password request.","commonSituations":"Stale password in netrc after a reset; password containing characters mangled by shell quoting on the command line; occasional network hiccup reported misleadingly as 'Invalid password'.","solutions":["Confirm the exact password in a browser login at playsuisse.ch.","Quote the password properly on the CLI or store it in netrc to avoid shell mangling.","Retry once to rule out the transient-failure case that shares this message.","Update yt-dlp if both steps behave inconsistently, since JSON paths may have moved."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":"from yt_dlp.utils import ExtractorError\n\ndef is_playsuisse_invalid_password(e: BaseException) -> bool:\n    \"\"\"True for the 'Invalid password' wrap from the authenticate/password step.\"\"\"\n    return isinstance(e, ExtractorError) and e.expected and str(e) == 'Invalid password'","tryCatchPattern":"from yt_dlp.utils import ExtractorError\n\ntry:\n    ydl.download([url])\nexcept ExtractorError as e:\n    if e.expected and str(e) == 'Invalid password':\n        raise CredentialsError('playsuisse rejected the password') from e\n    raise","preventionTips":["Reach this stage only with a username that already passed the initiate step — debug the password, not the identifier.","Quote passwords safely on the CLI or use netrc to avoid shell mangling.","Retry once: the same message can wrap a transient failure of the authenticate call."],"tags":["playsuisse","login","authentication","credentials","yt-dlp"],"backgroundTag":"invalid-credentials","analyzedSha":"81ecd58b1394793e6da9998cc19fdb45657f1685","analyzedAt":"2026-08-22T12:21:25.439Z","schemaVersion":2},"datasetVersion":"2026-08-22T14:17:55.899Z"}