ERPNext.com Frappe Cloud Support Partners Foundation Frappe School

[Bot] [Discussion] [PR #26237] feat: Increase number of supported currency exchanges

Testing Site URL: https://gh-imp-2021-00412.castlecraft.co.in

Pull Request URL: https://github.com/frappe/erpnext/pull/26237
Pull Request Title: feat: Increase number of supported currency exchanges
Pull Request Description:

Switch from frankfurter.app to exchangerate.host to accommodate more currency usage. Closes #25603

Credentials

username: ccunningham@riley.info
password: ee39ab3258

1 Like

@bluesky the site is ready, try with credentials.

1 Like
    at Object.click (account__tree_js:158)
    at HTMLButtonElement.<anonymous> (desk.bundle.53HS2ZU2.js:2885)
    at HTMLButtonElement.dispatch (libs.bundle.7O6DCBW2.js:1)
    at HTMLButtonElement.vt.handle (libs.bundle.7O6DCBW2.js:1)```

Got this error when creating a new account code with currency as USD

Created in List view and proceeded to get below message in Error Log. Trying to enter a TZS account expense to see if it calculates the exchange rate.

https://gh-imp-2021-00412.castlecraft.co.in/app/error-log/a95299ce21

Title
Get Exchange Rate
Error
Traceback (most recent call last):
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/setup/utils.py", line 110, in get_exchange_rate
    cache.setex(key, value, 6 * 60 * 60)
  File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/redis/client.py", line 1822, in setex
    return self.execute_command('SETEX', name, time, value)
  File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/redis/client.py", line 901, in execute_command
    return self.parse_response(conn, command_name, **options)
  File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/redis/client.py", line 915, in parse_response
    response = connection.read_response()
  File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/redis/connection.py", line 756, in read_response
    raise response
redis.exceptions.ResponseError: value is not an integer or out of range```

Thanks, @revant_one!


It seems the PR doesn’t work and the correct exchange rate doesn’t get fetched.

(No idea why the erpnext instance you set up is partially in German?! Tried to change the language to English but it didn’t work)

One of the reason I was suggesting each user creates their own user on the PR Site.

Language can be set as per preference that way.

cache.setex() had an issue.
Fixed in the latest commit. Works fine now.

1 Like

Checked it and the bug was fixed. Great PR @rtdany10!

1 Like

Thank you! :slight_smile:
Need to create some noise here to get one of the repo maintainer to review and give feedback or merge.


@nabinhait @gavindsouza @surajshetty

2 Likes

We got approved.
All the credits goes to Andreas Schlueter

1 Like