Giter VIP home page Giter VIP logo

Comments (43)

antstorm avatar antstorm commented on September 1, 2024 12

@antprt I suggest you getting yourself familiar with the thread before posting nonsense

from google_currency.

edlebert avatar edlebert commented on September 1, 2024 11

I just created another gem that uses openexchangerates.org: https://github.com/edlebert/money-oxr

from google_currency.

jirihradil avatar jirihradil commented on September 1, 2024 8

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.
Good speed to you, google_currency, served us well for 7 years, thank you and thanks all the contributors!

from google_currency.

apuente93 avatar apuente93 commented on September 1, 2024 7

This is still causing issues OpenURI::HTTPError: 404 Not Found

from google_currency.

kissrobber avatar kissrobber commented on September 1, 2024 4

I got 404 errors today and 5days ago

from google_currency.

edlebert avatar edlebert commented on September 1, 2024 2

@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 :)

from google_currency.

antstorm avatar antstorm commented on September 1, 2024 2

Have a look at https://github.com/RubyMoney/money#implementations for a list of alternatives as the Google converter is getting really unstable

from google_currency.

edlebert avatar edlebert commented on September 1, 2024 1

@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.

from google_currency.

sbleon avatar sbleon commented on September 1, 2024 1

https://github.com/edlebert/money-oxr is working well for me to. Thanks, @edlebert !

It seems like money-oxr will do conversions from any currency to any currency, even on the https://openexchangerates.org free plan. I had thought I was going to have to sign up for a paid account or write my own "convert X to Y via USD" routine, but the gem is pretty-much a drop-in replacement for google_currency, with just a touch of configuration required.

from google_currency.

edlebert avatar edlebert commented on September 1, 2024 1

@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?)

from google_currency.

antstorm avatar antstorm commented on September 1, 2024 1

@Onikoroshi you should bundle update google_currency instead, since it's not a dependency of money-rails or money. It should be a separate entry in your Gemfile.

from google_currency.

antstorm avatar antstorm commented on September 1, 2024 1

@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.

from google_currency.

antstorm avatar antstorm commented on September 1, 2024 1

@absyah thanks for reporting.

I've updated the README with a warning of this issue — https://github.com/RubyMoney/google_currency#warning

from google_currency.

jirihradil avatar jirihradil commented on September 1, 2024

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?

from google_currency.

jirihradil avatar jirihradil commented on September 1, 2024

Full stack:

Monetize.from_string(BigDecimal.new('100'), 'KWD').as_us_dollar.to_s

OpenURI::HTTPError: 404 Not Found
	from /home/ec2-user/.rvm/rubies/ruby-2.2.5/lib/ruby/2.2.0/open-uri.rb:358:in `open_http'
	from /home/ec2-user/.rvm/rubies/ruby-2.2.5/lib/ruby/2.2.0/open-uri.rb:736:in `buffer_open'
	from /home/ec2-user/.rvm/rubies/ruby-2.2.5/lib/ruby/2.2.0/open-uri.rb:211:in `block in open_loop'
	from /home/ec2-user/.rvm/rubies/ruby-2.2.5/lib/ruby/2.2.0/open-uri.rb:209:in `catch'
	from /home/ec2-user/.rvm/rubies/ruby-2.2.5/lib/ruby/2.2.0/open-uri.rb:209:in `open_loop'
	from /home/ec2-user/.rvm/rubies/ruby-2.2.5/lib/ruby/2.2.0/open-uri.rb:150:in `open_uri'
	from /home/ec2-user/.rvm/rubies/ruby-2.2.5/lib/ruby/2.2.0/open-uri.rb:716:in `open'
	from /home/ec2-user/.rvm/rubies/ruby-2.2.5/lib/ruby/2.2.0/open-uri.rb:724:in `read'
	from /home/ec2-user/.rvm/gems/ruby-2.2.5/bundler/gems/google_currency-fa6e8ba366c0/lib/money/bank/google_currency.rb:133:in `fetch_rate'
	from /home/ec2-user/.rvm/gems/ruby-2.2.5/bundler/gems/google_currency-fa6e8ba366c0/lib/money/bank/google_currency.rb:103:in `get_rate'
	from /home/ec2-user/.rvm/gems/ruby-2.2.5/gems/money-6.10.1/lib/money/bank/variable_exchange.rb:110:in `exchange_with'
	from /home/ec2-user/.rvm/gems/ruby-2.2.5/gems/money-6.10.1/lib/money/money.rb:436:in `exchange_to'
	from /home/ec2-user/.rvm/gems/ruby-2.2.5/gems/money-6.10.1/lib/money/money.rb:449:in `as_us_dollar'
	from (irb):8
	from /home/ec2-user/.rvm/gems/ruby-2.2.5/gems/railties-5.0.4/lib/rails/commands/console.rb:65:in `start'
	from /home/ec2-user/.rvm/gems/ruby-2.2.5/gems/railties-5.0.4/lib/rails/commands/console_helper.rb:9:in `start'
	from /home/ec2-user/.rvm/gems/ruby-2.2.5/gems/railties-5.0.4/lib/rails/commands/commands_tasks.rb:78:in `console'
	from /home/ec2-user/.rvm/gems/ruby-2.2.5/gems/railties-5.0.4/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
	from /home/ec2-user/.rvm/gems/ruby-2.2.5/gems/railties-5.0.4/lib/rails/commands.rb:18:in `<top (required)>'
	from bin/rails:9:in `require'
	from bin/rails:9:in `<main>'

from google_currency.

adrianwantsa avatar adrianwantsa commented on September 1, 2024

+1

from google_currency.

jirihradil avatar jirihradil commented on September 1, 2024

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; }

from google_currency.

jirihradil avatar jirihradil commented on September 1, 2024

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.

from google_currency.

jirihradil avatar jirihradil commented on September 1, 2024

Error rate is still increasing. Moved to https://github.com/spk/money-open-exchange-rates which uses a different endpoint. Works flawlessly.

from google_currency.

adrianwantsa avatar adrianwantsa commented on September 1, 2024

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.

from google_currency.

dmcwilliams avatar dmcwilliams commented on September 1, 2024

I have seen several errors this morning so I've begun looking into https://github.com/spk/money-open-exchange-rates

from google_currency.

antstorm avatar antstorm commented on September 1, 2024

Yeah, it looks like Google is winding down their exchange rates page. I'm getting occasional redirects to "Finance" section of google search.

from google_currency.

Paludis avatar Paludis commented on September 1, 2024

Having the same issue, will check out https://github.com/spk/money-open-exchange-rates

from google_currency.

lukaVarga avatar lukaVarga commented on September 1, 2024

It looks like it is constantly redirecting to the google search page now..

from google_currency.

antstorm avatar antstorm commented on September 1, 2024

@edlebert just curious why did you decide to build another gem instead of improving the existing one?

from google_currency.

Paludis avatar Paludis commented on September 1, 2024

@edlebert thank you, looks great!

from google_currency.

antstorm avatar antstorm commented on September 1, 2024

@edlebert makes sense, but I'd advice to focus the effort rather than diluting it if possible

from google_currency.

spk avatar spk commented on September 1, 2024

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

from google_currency.

spk avatar spk commented on September 1, 2024

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

from google_currency.

ThinkAndRun avatar ThinkAndRun commented on September 1, 2024

I've added PR to fix it: #71

from google_currency.

antstorm avatar antstorm commented on September 1, 2024

Just pushed a new version with updated URL — 3.4.1. Would appreciate if people who still use it could update it and tell me if it works consistently.

Also thanks to @ThinkAndRun for submitting the fix.

from google_currency.

Onikoroshi avatar Onikoroshi commented on September 1, 2024

@antstorm : Is there a fix for those of us using your money-rails gem ( https://github.com/antstorm/money-rails )? I ran bundle update money-rails and am still getting the Money::Bank::GoogleCurrencyFetchError: Money::Bank::GoogleCurrencyFetchError error. :/

from google_currency.

Onikoroshi avatar Onikoroshi commented on September 1, 2024

@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!

from google_currency.

antstorm avatar antstorm commented on September 1, 2024

@Onikoroshi no problem, glad that it works now

from google_currency.

bretweinraub avatar bretweinraub commented on September 1, 2024

http://finance.google.com/finance/converter?a=1&from=USD&to=EUR

image

from google_currency.

wikiti avatar wikiti commented on September 1, 2024

Looks like the current path (/bctzjpnsun/converter) is throwing 404 errors:

https://finance.google.com/bctzjpnsun/converter?a=1&from=USD&to=EUR

from google_currency.

bretweinraub avatar bretweinraub commented on September 1, 2024

I threw in the towel on Google Finance and have hacked together something simple using fixer.io.

from google_currency.

CarlosIgnacioGo avatar CarlosIgnacioGo commented on September 1, 2024

OpenURI::HTTPError: 404 Not Found

from google_currency.

apuente93 avatar apuente93 commented on September 1, 2024

Thanks for the reply. I suggest moving to https://github.com/spk/money-open-exchange-rates. Works like a charm without this error.

from google_currency.

antprt avatar antprt commented on September 1, 2024

Is mainteined the gem?

From the last 15 days I have the same error: OpenURI::HTTPError: 404 Not Found

from google_currency.

absyah avatar absyah commented on September 1, 2024

Today status: OpenURI::HTTPError: 404 Not Found

from google_currency.

ravindra9278 avatar ravindra9278 commented on September 1, 2024

Still Getting 404 Error

> bank = Money::Bank::GoogleCurrency.new
> bank.get_rate(:GBP, :USD).to_f

> Traceback (most recent call last):
        1: from (irb):15
OpenURI::HTTPError (404 Not Found)

from google_currency.

joshuapinter avatar joshuapinter commented on September 1, 2024

Just wanted to add to here. We ended up replacing google_currency with eu_central_bank and it was very easy and worked great. It's part of RubyMoney so it should be well maintained. Basic replacement looks like this:

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.

from google_currency.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.