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

Make error message explicit #545

Closed
tarekziade opened this issue Nov 4, 2015 · 6 comments
Closed

Make error message explicit #545

tarekziade opened this issue Nov 4, 2015 · 6 comments
Assignees

Comments

@tarekziade
Copy link
Contributor

https://github.com/mozilla-services/cliquet/blob/master/cliquet/storage/postgresql/client.py#L61

"PostgreSQL dependencies missing" is not very clear.

Should be "SQLAlchemy missing" maybe ?

@Natim
Copy link
Contributor

Natim commented Nov 4, 2015

Actually the way to install cliquet postgresql dependencies is to use:

pip install cliquet[postgresql]

rather than just installing SQLAlchemy.

@tarekziade
Copy link
Contributor Author

@Natim this is unrelated to the issue

@leplatrem
Copy link
Contributor

Would you prefer a link to docs in the error message? Or suggesting the command to run?

Or Python libraries for PostgreSQL are missing ?

@tarekziade
Copy link
Contributor Author

I would explicitly indicate in the error which dependency is missing or has a problem.

message = ("PostgreSQL sqlalchemy dependency missing. "
                   "Refer to installation section in documentation.")

The reason is that sometimes you can have an installation error and knowing which lib is screwed can be useful.

@leplatrem
Copy link
Contributor

We wanted to avoid mentioning it explicitly, but if it can make sense, why not!

As @Natim said there are several ones, but I think that if some of the other ones are missing, it fails somewhereelse within sqlalchemy. So why not mentionning sqla here indeed...

@tarekziade
Copy link
Contributor Author

As @Natim said there are several ones

yes, in this code, I see "if sqlachemy is None:"

@leplatrem leplatrem self-assigned this Nov 11, 2015
Natim added a commit that referenced this issue Nov 12, 2015
…tion-error

Mention explicit dependency missing (fixes #545)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants