OpenBBTerminal icon indicating copy to clipboard operation
OpenBBTerminal copied to clipboard

[IMPROVE] Improve error message when openbb.stocks.pred. is used

Open sautplat opened this issue 2 years ago • 2 comments

What's the feature that should be improved? pred_api does not get imported when tensorflow is not installed. As a result, when openbb.stocks.pred. is used, it's hard to know why the API is not working as expected.

Describe how you would like the feature improved Ideally, we should know that openbb.stocks.pred was not fully imported due to tensorflow dependency

sautplat avatar May 07 '22 09:05 sautplat

What would be the proper way of handling this?

At the moment the import of the pred api is wrapped into a try-except. image

We can add a message printout when the exception is raised, but that would lead to this message being there all the time even if the user had no intention to use the prediction menu. We can handle this verbosity using some sort of env variable flag, but that would not add to UX simplicity.

@sautplat @DidierRLopes please advice

piiq avatar May 23 '22 08:05 piiq

What would be the proper way of handling this?

At the moment the import of the pred api is wrapped into a try-except. image

We can add a message printout when the exception is raised, but that would lead to this message being there all the time even if the user had no intention to use the prediction menu. We can handle this verbosity using some sort of env variable flag, but that would not add to UX simplicity.

@sautplat @DidierRLopes please advice

not sure how to best handle this honestly

DidierRLopes avatar May 23 '22 09:05 DidierRLopes