Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange error when setting a wrong username #1466

Closed
josemazo opened this issue Jan 10, 2020 · 4 comments
Closed

Strange error when setting a wrong username #1466

josemazo opened this issue Jan 10, 2020 · 4 comments
Labels

Comments

@josemazo
Copy link
Contributor

josemazo commented Jan 10, 2020

Really this is a problem that comes from carto-python, or even from pyrestcli, but it returns a confusing error, even for experienced developers. So maybe, we should forget it, but let's document it.

If you set a wrong username in the credentials, the returned error is a NotFoundException with a huge HTML document.

from cartoframes import read_carto, to_carto
from cartoframes.auth import set_default_credentials

set_default_credentials(
    username='josema_not_found_account',
    api_key='josema_not_found_account_api_key'
)

gdf = read_carto('lanius_collurio')

The realised exceptions message starts with:

NotFoundException: <!DOCTYPE html> <html> <meta charset=utf-8> ...
@Jesus89
Copy link
Member

Jesus89 commented Jan 10, 2020

Good catch. Maybe we can filter the exception NotFoundException form CF when using carto-python client calls and raise a better exception.

@Jesus89
Copy link
Member

Jesus89 commented Jan 10, 2020

However, this should be fixed in carto-python or pyrescli because otherwise, the Traceback will contain the 404 HTML page.

@Jesus89 Jesus89 removed the triage label Jun 17, 2020
@Jesus89
Copy link
Member

Jesus89 commented Jul 20, 2020

@Jesus89
Copy link
Member

Jesus89 commented Sep 4, 2020

Closed in #1687

@Jesus89 Jesus89 closed this as completed Sep 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants