In [2]: import investpy
In [3]: investpy.get_stock_dividends('USB', 'united states')
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-3-ba4c614a892b> in <module>
----> 1 investpy.get_stock_dividends('USB', 'united states')
/usr/local/lib/python3.7/site-packages/investpy/stocks.py in get_stock_dividends(stock, country)
1167 element_.getnext()
1168 .text_content()
-> 1169 .replace(",", "")
1170 )
1171 if element_.get("data-value") in type_values.keys():
ValueError: could not convert string to float:
In [4]:
i found this error with:
SO US8425871071
GIS US3703341046
MRK US58933Y1055
PFE US7170811035
MO US02209S1033
USB US9029733048
VZ US92343V1044
IP US4601461035
BEN US3546131018
CAH US14149Y1082
BMY US1101221083
HPE US42824C1099
MET US59156R1086
ALV@DE DE0008404005
FRE@DE DE0005785604
MUV2@DE DE0008430026
Hello!
I get this error for some stocks:
i found this error with: SO US8425871071 GIS US3703341046 MRK US58933Y1055 PFE US7170811035 MO US02209S1033 USB US9029733048 VZ US92343V1044 IP US4601461035 BEN US3546131018 CAH US14149Y1082 BMY US1101221083 HPE US42824C1099 MET US59156R1086 ALV@DE DE0008404005 FRE@DE DE0005785604 MUV2@DE DE0008430026