Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught exception: Net::ReadTimeout #121

Closed
netwire88 opened this issue Jul 9, 2022 · 8 comments
Closed

Uncaught exception: Net::ReadTimeout #121

netwire88 opened this issue Jul 9, 2022 · 8 comments

Comments

@netwire88
Copy link

All of a sudden, we are gettin Uncaught exception: Net::ReadTimeout, did the project go down?

@Splitrox
Copy link

Splitrox commented Jul 9, 2022

Same thing here

@netwire88
Copy link
Author

It looks like https://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml is down

@Splitrox
Copy link

Splitrox commented Jul 9, 2022

Maybe there's some way to make sure this gem doesn't crash the whole site?

@netwire88
Copy link
Author

Until there's a better solution, you can do this

  1. Download latest eurofxref-daily.txt and rename extension to .xml (can't upload XML files to GitHub)
  2. Add it to your /config/initializers or somewhere similar
  3. In money.rb, replace config.default_bank.update_rates with config.default_bank.update_rates(Rails.root.join('config', 'initializers', 'eurofxref-daily.xml'))

At least that'll start your project. I tried the code below in money.rb but the timeout is really long, so it doesn't work

  begin
    config.default_bank.update_rates
  rescue
    config.default_bank.update_rates(Rails.root.join('config', 'initializers', 'eurofxref-daily.xml'))
  end

@dobreandl
Copy link

https://github.com/rmustafin/russian_central_bank - This also works, if you're looking for a quick fix.

@ephraimm
Copy link

The feed is not down there has been a CAPTCHA check added:

Security Check
Our systems have detected unusual traffic from your computer network.
This page checks to see if it is really you sending the requests and not a bot.

Please click here to verify that you are not a bot.

@bjer
Copy link

bjer commented Jul 10, 2022

Any alternative sources? Don't really trust a Russian bank.. Could download https://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml with curl after filling in the captcha but
the eu_central_bank gem fails to do so.

@ephraimm
Copy link

try https://github.com/spk/money-open-exchange-rates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants