Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Be more verbose on import errors #18

Open
ramnes opened this issue Apr 25, 2018 · 0 comments
Open

Be more verbose on import errors #18

ramnes opened this issue Apr 25, 2018 · 0 comments
Labels
enhancement New feature or request

Comments

@ramnes
Copy link
Collaborator

ramnes commented Apr 25, 2018

Trying to run our README's example without PyMongo installed throws:

Traceback (most recent call last):
  File "run.py", line 2, in <module>
    from flask_stupe import paginate, schema_required
ImportError: cannot import name 'paginate'

This error is completely normal, because we only expose things that are usable based on the different modules available. But it's not very developer-friendly and an error message explaining that paginate is not available because pymongo isn't installed would be much better.

@ramnes ramnes added the enhancement New feature or request label Apr 25, 2018
@ramnes ramnes changed the title Be more verbose on import error Be more verbose on import errors Apr 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant