You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems like this issue is within the the Forex API. When requesting from them with EUR as the base, they return a string for those rates, but a float with any other base. Most likely this issue should be addressed there instead of in this codebase, but it could be fixed here as well. For reference, here is the API.
from forex_python.converter import CurrencyRates
amount = 5
c = CurrencyRates()
eur = c.get_rate("EUR", "PHP")
amount_eur = eur * amount
print(type(amount_eur))
print(amount_eur)
output -
<class 'str'>
59.34259.34259.34259.34259.342
it returns a string not a float
The text was updated successfully, but these errors were encountered: