ERPNext Conference 2019* ERPNext.com Blog

Auto Currency exchange rate


#1

I have not mentioned conversion rate manually, is there any automatic system that fetches the conversion rates automatically of live basis?
I am getting following error:

Title
Get Exchange Rate
Error
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/setup/utils.py”, line 107, in get_exchange_rate
response.raise_for_status()
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/requests/models.py”, line 940, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://frankfurter.app/2019-08-21?base=INR&symbols=SAR


#2

server is connected to internet


#3

ERPNext already uses frankfurter.app to pull live exchange rates which in turn uses data from European Central Bank.

Since the bank is not publishing rates for SAR, it is not being found by ERPNext at the moment.

$ curl https://frankfurter.app/latest

Output:

{"amount":1.0,"base":"EUR","date":"2019-08-20","rates":{"AUD":1.6347,"BGN":1.9558,"BRL":4.4959,"CAD":1.4762,"CHF":1.086,"CNY":7.818,"CZK":25.796,"DKK":7.456,"GBP":0.91623,"HKD":8.6868,"HRK":7.3838,"HUF":327.23,"IDR":15794,"ILS":3.902,"INR":79.441,"ISK":138.1,"JPY":117.79,"KRW":1337.78,"MXN":21.944,"MYR":4.6263,"NOK":9.9638,"NZD":1.7286,"PHP":57.964,"PLN":4.3552,"RON":4.7305,"RUB":73.836,"SEK":10.7653,"SGD":1.5351,"THB":34.086,"TRY":6.3328,"USD":1.1076,"ZAR":17.0117}}%

That’s what the error at the end is saying that it is unable to find the exchange rate for INR and SAR. You can manually set this in Currency Exchange.


#4

thanks Kennethsequeira, is there a way to manage with SAR to get auto retrieve?


#5

You will need to explore the way for that… meanwhile if we have any insights, we will revert back