Skip to content
This repository has been archived by the owner on Mar 24, 2024. It is now read-only.

Pretty print error message on wrong credentials #12

Open
Zebradil opened this issue Nov 12, 2020 · 0 comments
Open

Pretty print error message on wrong credentials #12

Zebradil opened this issue Nov 12, 2020 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Zebradil
Copy link
Owner

Zebradil commented Nov 12, 2020

Steps

  • run the app with any incorrect credentials
  • see the ugly stacktrace:
CRITICAL:root:('Invalid email/password combination.', PyiCloudAPIResponseException('Unknown reason'))
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/pyicloud/base.py", line 220, in authenticate
    req = self.session.post(
  File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 578, in post
    return self.request('POST', url, data=data, json=json, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/pyicloud/base.py", line 110, in request
    self._raise_error(code, reason)
  File "/usr/local/lib/python3.8/site-packages/pyicloud/base.py", line 132, in _raise_error
    raise api_error
pyicloud.exceptions.PyiCloudAPIResponseException: Unknown reason

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/gimme_iphotos/__init__.py", line 81, in main
    DownloaderApp(vars(args)).run()
  File "/usr/local/lib/python3.8/site-packages/gimme_iphotos/downloader.py", line 106, in run
    api = self.connect_to_icloud(config)
  File "/usr/local/lib/python3.8/site-packages/gimme_iphotos/downloader.py", line 122, in connect_to_icloud
    api = PyiCloudService(config["username"], config["password"])
  File "/usr/local/lib/python3.8/site-packages/pyicloud/base.py", line 204, in __init__
    self.authenticate()
  File "/usr/local/lib/python3.8/site-packages/pyicloud/base.py", line 227, in authenticate
    raise PyiCloudFailedLoginException(msg, error)
pyicloud.exceptions.PyiCloudFailedLoginException: ('Invalid email/password combination.', PyiCloudAPIResponseException('Unknown reason'))
@Zebradil Zebradil added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Nov 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant