mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-28 21:12:16 +00:00
Fixinttests (#1635)
* Added fix for finzin library * Fixed options and screener Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com>
This commit is contained in:
@@ -88,5 +88,8 @@ def get_comparison_data(data_type: str, similar: List[str]):
|
||||
try:
|
||||
return screen.screener_view(verbose=0)
|
||||
except IndexError:
|
||||
console.print("[red]Invalid data from website[red]")
|
||||
console.print("[red]Invalid data from website[red]\n")
|
||||
return pd.DataFrame()
|
||||
except AttributeError:
|
||||
console.print("[red]Invalid data from website[red]\n")
|
||||
return pd.DataFrame()
|
||||
|
||||
@@ -165,6 +165,9 @@ def view_historical_greeks(
|
||||
ax.set_title(
|
||||
f"{(greek).capitalize()} historical for {ticker.upper()} {strike} {['Call','Put'][put]}"
|
||||
)
|
||||
if df.empty:
|
||||
console.print("[red]Data from API is not valid.[/red]\n")
|
||||
return
|
||||
ax.set_xlim(df.index[0], df.index[-1])
|
||||
ims = im1 + im2
|
||||
labels = [lab.get_label() for lab in ims]
|
||||
|
||||
@@ -105,6 +105,9 @@ def get_screener_data(preset_loaded: str, data_type: str, limit: int, ascend: bo
|
||||
except IndexError:
|
||||
console.print("[red]Invalid data provided by the website[/red]\n")
|
||||
return pd.DataFrame()
|
||||
except AttributeError:
|
||||
console.print("[red]Invalid data provided by the website[/red]\n")
|
||||
return pd.DataFrame()
|
||||
|
||||
else:
|
||||
preset_filter = configparser.RawConfigParser()
|
||||
|
||||
Reference in New Issue
Block a user