-
Notifications
You must be signed in to change notification settings - Fork 90
Occasional OpenURI::HTTPError: 404 Not Found
starting ~3/9/2018
#65
Comments
The same for me. Started yesterday (3/12/2018) and occurs occasionally for different currencies converted to USD (AUD, MAD, KES). When repeating, it's OK. Guess something to do with the Google's endpoint? |
Full stack:
|
+1 |
I did a prefetch of all currencies as a workaround in Ruby. If it throws 404, I repeat it as long as it fails. Also changed ttl to 30 days: Money::Bank::GoogleCurrency.ttl_in_seconds = 2592000 # 30 days GOOGLE_UNSUPPORTED_CURRENCIES = ["BYR", "GGP", "IMP", "IRR", "JEP", "PRB", "MNK", "RMB", "TVD", "SSP", "STD", "VEF", "VND", "ZMK", "ZWD"];
ISO4217::Currency.currencies.keys.sort.each {|c| p c; next if GOOGLE_UNSUPPORTED_CURRENCIES.include?(c); p Monetize.from_string(BigDecimal.new('100'), c).as_us_dollar.to_s; sleep 1; } |
Errors are increasing. Is the endpoint going to die? Guess that's not very probable that Google has unstable finance converter for couple of days. |
Error rate is still increasing. Moved to https://github.com/spk/money-open-exchange-rates which uses a different endpoint. Works flawlessly. |
I haven't seen the error for 24 hours. But also have https://github.com/spk/money-open-exchange-rates ready to go, if need be. |
I have seen several errors this morning so I've begun looking into https://github.com/spk/money-open-exchange-rates |
Yeah, it looks like Google is winding down their exchange rates page. I'm getting occasional redirects to "Finance" section of google search. |
Just FYI - using https://github.com/spk/money-open-exchange-rates for 2 days instead of this gem and can say it's a good successor. |
Having the same issue, will check out https://github.com/spk/money-open-exchange-rates |
It looks like it is constantly redirecting to the google search page now.. |
I just created another gem that uses openexchangerates.org: https://github.com/edlebert/money-oxr |
@edlebert just curious why did you decide to build another gem instead of improving the existing one? |
@antstorm Other than getting the rates from the same source, the gems are pretty different. First and foremost I need a useful and reliable bank, so the easiest option was just to create another option. |
@edlebert thank you, looks great! |
https://github.com/edlebert/money-oxr is working well for me to. Thanks, @edlebert ! It seems like |
@edlebert makes sense, but I'd advice to focus the effort rather than diluting it if possible |
@antstorm I understand, but in some cases, the author isn't willing to take their project in the direction you want, which is the case here. Thanks again for this awesome gem, and I hope we can all continue to enjoy free and easy currency-exchanges for years to come :) |
Hello, if you where talking about money-open-exchange-rates @edlebert, I don't see any pull requests or issues where I was not willing to accept improvement or direction changes, cheers |
@spk I don't mean any disrespect. I never said you were unwilling to accept improvement. You're very friendly and willing to accept PRs, etc. Several of the Issues in money-open-exchange-rates have expressed confusion surrounding caching/TTL/auto-refresh. Your response has always been for users to set up cron or heroku scheduler tasks to manage auto-refresh and re-writing the cache (I'm not linking them all here). That's a totally valid design decision, and it's one you're obviously comfortable with keeping. For myself, I wanted something similar to google_currency. Also, no offense to anyone, but I'm not going to respond to any more "why" questions here about money-oxr here. Feel free to open an issue or PR, or contact me directly (can you even do that on github?) |
Thanks for your reply @edlebert, I did not feel any disrespect but I just wanted to said that I'm not against change and I'm always glad to have feedback on projects, the issues are here spk/money-open-exchange-rates#37 and spk/money-open-exchange-rates#38; cheers |
I've added PR to fix it: #71 |
Just pushed a new version with updated URL — Also thanks to @ThinkAndRun for submitting the fix. |
@antstorm : Is there a fix for those of us using your money-rails gem ( https://github.com/antstorm/money-rails )? I ran |
@Onikoroshi you should |
@antstorm : Aha, that was it! Thank you so much for taking time to answer, even though it was a bit off-topic. I really appreciate it! |
@Onikoroshi no problem, glad that it works now |
This is still causing issues OpenURI::HTTPError: 404 Not Found |
I got 404 errors today and 5days ago |
@apuente93 @kissrobber This is caused by network conditions, instability of google's API (looks like it's not really supported). If you are still using this gem I'd suggest putting some retry logic around the call. |
Looks like the current path ( https://finance.google.com/bctzjpnsun/converter?a=1&from=USD&to=EUR |
I threw in the towel on Google Finance and have hacked together something simple using fixer.io. |
OpenURI::HTTPError: 404 Not Found |
Thanks for the reply. I suggest moving to https://github.com/spk/money-open-exchange-rates. Works like a charm without this error. |
Have a look at https://github.com/RubyMoney/money#implementations for a list of alternatives as the Google converter is getting really unstable |
Is mainteined the gem? From the last 15 days I have the same error: OpenURI::HTTPError: 404 Not Found |
@antprt I suggest you getting yourself familiar with the thread before posting nonsense |
The google currency api is no longer supported by Google - see RubyMoney/google_currency#65 Fix is to use https://github.com/edlebert/money-oxr instead.
Fix Australian payers google currency bug The google currency api is no longer supported by Google - see RubyMoney/google_currency#65 Fix is to use https://github.com/edlebert/money-oxr instead.
Today status: |
@absyah thanks for reporting. I've updated the README with a warning of this issue — https://github.com/RubyMoney/google_currency#warning |
Still Getting 404 Error
|
Just wanted to add to here. We ended up replacing eu_central_bank = EuCentralBank.new
eu_central_bank.update_rates # TODO: Make this use a cache in a shared directory and just update it every day.
Money.default_bank = eu_central_bank Definitely a good option to consider. |
Has anyone else been getting occasional
OpenURI::HTTPError: 404 Not Found
errors when trying to fetch rates?Ruby: 2.4.3
Example URL that it tries to hit: http://finance.google.com/finance/converter?a=1&from=USD&to=EUR
I can't seem to deterministically reproduce this... has anyone else been running into this recently?
The text was updated successfully, but these errors were encountered: