-
Notifications
You must be signed in to change notification settings - Fork 24
Description
Description
Scenario:
- A user wants to try ecologits
- They copy and paste the getting started tutorial
- Because of some unforeseeable virtual environment issue, the Ecologits.init() method fails on one specific provider with an obscure not caught exception.
- Depending on their ability to identify the root cause of the problem, they might juste deem the package broken and give up on using it.
It just happened to a colleague of mine, I will see if I have enough info to create a bug issue too on it later.
Suggested possible way to handle this:
1- Throw a more explicit error
When one specific provider fails to start catch the exception and raise an error with the following informations:
- there is an error with xxx provider
- please try specifying providers other than xxx + example
- if you need xxx provider, pleas retry on a new virtual environnment or update your dependencies first
- if it still does not work, please open an issue with the error you just encountered and you virtual environement specifications
This seem to me like a good way to handle it but I might have missed a point.
2- Catch the error , warn the user there was a problem loading it and leave it "for later".
Either the user does not need the incriminated provider and won't have any problem or they will get an error when they end up trying the given provider.
Not a big fan of this one as it might end up with the user just not having the impacts calculated on their results not knowing why.
3- Update the getting started tutorial
Needing more than one providers on a project is probably not happening often, so this would be closer to reality and less error prone I guess?
The bad part is that it entails choosing a "favorite" provider or using a placeholder. Also the user choosing a provider that rises an error in their environment would still be annoyed and might give up on ecologits.