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

Updating exchange rates #27

Closed
avxkim opened this issue Nov 2, 2017 · 13 comments
Closed

Updating exchange rates #27

avxkim opened this issue Nov 2, 2017 · 13 comments
Labels

Comments

@avxkim
Copy link

avxkim commented Nov 2, 2017

These days i've noticed the following bug:

When i type conv 1 usd kzt it keeps telling my "Updating exchange rates" and i won't get actual data...

@deanishe
Copy link
Owner

deanishe commented Nov 2, 2017

What does the log file say? (Enter conv workflow:openlog to see it.)

@avxkim
Copy link
Author

avxkim commented Nov 2, 2017

21:48:05 currency.py:247 INFO     fetching exchange rates from Yahoo! and CryptoCompare.com ...
21:48:06 background.py:180 INFO     [update] job already running
21:48:07 background.py:180 INFO     [update] job already running
21:48:08 background.py:180 INFO     [update] job already running
21:48:09 workflow.py:2266 ERROR    HTTP Error 999: Request denied
Traceback (most recent call last):
  File "/Users/alexanderkim/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.A19B513B-C8AD-4987-BDA2-537F63E1F002/workflow/workflow.py", line 2259, in run
    func(self)
  File "/Users/alexanderkim/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.A19B513B-C8AD-4987-BDA2-537F63E1F002/currency.py", line 251, in main
    CURRENCY_CACHE_AGE)
  File "/Users/alexanderkim/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.A19B513B-C8AD-4987-BDA2-537F63E1F002/workflow/workflow.py", line 1890, in cached_data
    data = data_func()
  File "/Users/alexanderkim/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.A19B513B-C8AD-4987-BDA2-537F63E1F002/currency.py", line 232, in fetch_exchange_rates
    rates.update(f.get())
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/pool.py", line 567, in get
    raise self._value
HTTPError: HTTP Error 999: Request denied

@deanishe
Copy link
Owner

deanishe commented Nov 2, 2017

It appears that the Yahoo! Finance API is no more. I've replaced it with openexchangerates.org in v3.1.

You'll need an API key, which you can get for free here.

@deanishe deanishe closed this as completed Nov 2, 2017
@deanishe deanishe added the bug label Nov 2, 2017
@avxkim
Copy link
Author

avxkim commented Nov 2, 2017

Where to put API key? this project shows wrong currency prices... Also it doesn't know Kazakhstani tenge, unlike Yahoo finance. Possible to use: https://finance.google.com/finance ?

@deanishe
Copy link
Owner

deanishe commented Nov 2, 2017

Where to put API key?

Read the instructions

this project shows wrong currency prices...

For example…?

Also it doesn't know Kazakhstani tenge

Yes, it does.

Possible to use: https://finance.google.com/finance?

I already told you "no".

@tenpoundhero
Copy link

@deanishe Do you just copy and paste the entire result generated from the api key request into "value" for APP_KEY? I've done that so far and it's still not working correctly for me.

@deanishe
Copy link
Owner

deanishe commented Nov 2, 2017

@tenpoundhero When you sign up, they send you an email with an "App ID". Paste that in to the APP_KEY value.

Alternatively, you can grab your "App ID" from here.

@tenpoundhero
Copy link

tenpoundhero commented Nov 2, 2017

@deanishe APP_KEYnow has my "App ID"

18:23:08 convert.py:323 CRITICAL No to_units (or defaults) for [currency] 18:23:09 convert.py:323 CRITICAL No to_units (or defaults) for [currency] 18:23:10 convert.py:315 CRITICAL invalid query (1usd gbp): Unknown unit: gbp 18:23:21 convert.py:323 CRITICAL No to_units (or defaults) for [currency] 18:23:22 convert.py:315 CRITICAL invalid query (1 usd gbp): Unknown unit: gbp

That's my log, it's still having trouble finding GBP
P.S. I have now updated to 3.2

@deanishe
Copy link
Owner

deanishe commented Nov 2, 2017

Can you post the entire log for that query (i.e. not just the error message) and format it properly, please?

Also, try running conv workflow:delcache first.

@tenpoundhero
Copy link

tenpoundhero commented Nov 2, 2017

@deanishe
Well I cleared the cache and that seems to for some reason fixed the issue...

Thanks for the help!

@avxkim
Copy link
Author

avxkim commented Nov 3, 2017

this project shows wrong currency prices...

conv 1btc usd shows 7.183USD, while everywhere it's 7.238USD. Where does (openexchangerates.org) gets cryptocurrency rates?

@avxkim
Copy link
Author

avxkim commented Nov 3, 2017

How to refresh rates quickly?

@deanishe
Copy link
Owner

deanishe commented Nov 3, 2017

I see you still haven't read the README.

Please stop wasting my time with questions that are answered in the README.

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

No branches or pull requests

3 participants