OpenBBTerminal icon indicating copy to clipboard operation
OpenBBTerminal copied to clipboard

[Bug] API openbb.stocks.load not accepting optional arguments

Open minhhoang1023 opened this issue 2 years ago • 3 comments

This was reported by users:

openbb.stocks.load("GME") works fine

But openbb.stocks.load("GME", None, None, None, None, None) doesn't work

Users should be able to pass in their own default values.

image

minhhoang1023 avatar Jun 28 '22 10:06 minhhoang1023

openbb.stocks.load("GME", None, None, None, None, None) doesn't work since the None overwrites the default values so the function gets unfunctional input. Proof of this is that openbb.stocks.load("GME", 1, 1, 1, 1, 1) generates the same error.

openbb.stocks.load accepts optional arguments, see picture: image

So this shouldn't be an issue at all

northern-64bit avatar Jun 28 '22 13:06 northern-64bit

So it only accepts "some optional" arguments, but not all. Can we have it such that all optional arguments can be set and not generating that type of error?

minhhoang1023 avatar Jun 28 '22 13:06 minhhoang1023

Here is every argument possible set and it works: image

northern-64bit avatar Jun 28 '22 14:06 northern-64bit

I am going to close this issue. The arguments do not accept None because they need default values.

colin99d avatar Aug 10 '22 21:08 colin99d