Comments (14)
Both for version 7 and version 8 doesn't work anymore.
Our country is in China.
Is this issue just happen to us?
I check that only Yahoo that not worked.
from account-financial-tools.
We are experiencing the same issue. Any news on this?
from account-financial-tools.
yes, we still waiting too, right now we just change the web services that we used.
Yahoo is not worked anymore.
from account-financial-tools.
Since we are unable to wait for a resolution, we dug into the code and fixed this issue.
It appears that the original URL utilized by the Yahoo API is no longer valid as manually calling it returns a 404 error. Reading into the API, I've reformatted the URL to properly return the csv file used for parsing the rate. Below is a snippet of the code I changed in currency_rate_update.py to get this working properly.
def get_updated_currency(self, currency_array, main_currency, max_delta_days):
"""implementation of abstract method of Curreny_getter_interface"""
self.validate_cur(main_currency)
#url='http://download.finance.yahoo.com/d/quotes.txt?s="%s"=X&f=sl1c1abg'
url='http://download.finance.yahoo.com/d/quotes.csv?s=%s=X&f=sl1c1abg'
from account-financial-tools.
I check manually this url='http://download.finance.yahoo.com/d/quotes.csv?s=%s=X&f=sl1c1abg'
it shows in .csv file
=X N/A N/A N/A N/A N/A
it means Not Available.
from account-financial-tools.
%s is the variable passed into the URL intended to represent the currency you are trying to get a quote for. The reason it is returning N/A is because it doesn't know what currency you are trying to get rates for.
See This note:
Using YQL with the Yahoo Finance table (yahoo.finance.quotes) linked by NT3RP, currencies appear with symbol="ISOCODE=X", for example: "ARS=X" for Argentine Peso, "AUD=X" for Australian Dollar. "USD=X" doesn't exist, but it would be 1, since the rest are rates against USD
So a properly formed URL would return rates in the csv assuming you pass in a currency. Try this:
http://download.finance.yahoo.com/d/quotes.csv?s=EUR=X&f=sl1c1abg (Note: I replaced the %s with EUR to return the current FX for EUR against USD which always equals 1.
Hope it helps. Our chages to the code have been working perfectly for nearly a month.
from account-financial-tools.
hi,I Set url as you suggest , but log shows
!!! 2015-06-03 18:16:27.890209 not all arguments converted during string formatting !!!
My main currency is INR and Not Update any Currency Rate.
Have you change code in other area.
from account-financial-tools.
Have you any idea for me.what to do for currency rate update?.
Please Help me...
from account-financial-tools.
Since INR is the currency you are trying to get rates for, manually try this URL by copying and pasting into your browser window. It should return a csv file containing the FX for INR using USD as the base currency where USD = 1.
http://download.finance.yahoo.com/d/quotes.csv?s=INR=X&f=sl1c1abg
Steps:
- Find your currency_rate_update module located in your addons directory under openerp. (In my case it is located in /opt/openerp/addons/currency_rate_update).
- Within the module, open currency_rate_update.py and locate the Yahoo_getter class.
- Find the get_updated_currency function and edit the URL. (I've placed the code below)
- save, close, and reload the module
When you complete this, if it still doesn't work, please send along a log trace for further review.
Here is the entire class as it exists in my implementation:
#Yahoo ###################################################################################
class Yahoo_getter(Curreny_getter_interface) :
"""Implementation of Currency_getter_factory interface
for Yahoo finance service"""
def get_updated_currency(self, currency_array, main_currency, max_delta_days):
"""implementation of abstract method of Curreny_getter_interface"""
self.validate_cur(main_currency)
#url='http://download.finance.yahoo.com/d/quotes.txt?s="%s"=X&f=sl1c1abg'
url='http://download.finance.yahoo.com/d/quotes.csv?s=%s=X&f=sl1c1abg'
if main_currency in currency_array :
currency_array.remove(main_currency)
for curr in currency_array :
self.validate_cur(curr)
res = self.get_url(url%(main_currency+curr))
val = res.split(',')[1]
if val :
self.updated_currency[curr] = val
else :
raise Exception('Could not update the %s'%(curr))
return self.updated_currency, self.log_info # empty string added by polish changes
from account-financial-tools.
Here is the class as it exists in my implementation openerp v5:
#Yahoo ###################################################################################
class Yahoo_getter(Curreny_getter_interface) :
"""Implementation of Currency_getter_factory interface
for Yahoo finance service"""
def get_updated_currency(self, currency_array, main_currency):
"""implementation of abstract method of Curreny_getter_interface"""
self.validate_cur(main_currency)
url='http://download.finance.yahoo.com/d/quotes.csv?s="INR"&f=sl1c1ab'
if main_currency in currency_array :
currency_array.remove(main_currency)
for curr in currency_array :
self.validate_cur(curr)
res = self.get_url(url%(main_currency+curr))
val = res.split(',')[1]
if val :
self.updated_currency[curr] = val
else :
raise Exception('Could not update the %s'%(curr))
return self.updated_currency, self.log_info # empty string added by polish changes
and Log is
currency updated at 2015-02-23 14:41:45.762483
currency updated at 2015-02-24 14:12:09.816829
currency updated at 2015-02-25 14:33:09.548328
currency updated at 2015-02-26 14:00:01.881651
currency updated at 2015-02-27 14:00:18.836724
currency updated at 2015-02-28 13:57:08.293352
currency updated at 2015-03-01 13:57:10.236598
currency updated at 2015-03-02 13:57:12.629513
currency updated at 2015-03-03 13:56:49.216760
currency updated at 2015-03-04 13:56:53.489923
!!! 2015-03-05 14:05:30.771612 invalid literal for float(): N/A !!!
!!! 2015-03-06 14:39:53.518634 invalid literal for float(): N/A !!!
!!! 2015-03-07 13:59:09.583830 invalid literal for float(): N/A !!!
!!! 2015-03-31 13:59:34.978732 invalid literal for float(): N/A !!!
!!! 2015-04-09 14:11:45.734716 invalid literal for float(): N/A !!!
!!! 2015-04-10 14:19:30.560043 'Yahoo_getter' object has no attribute 'MOD_NAME' !!!
!!! 2015-04-11 14:03:06.669076 invalid literal for float(): N/A !!!
!!! 2015-04-12 14:18:29.537300 invalid literal for float(): N/A !!!
!!! 2015-04-13 14:00:18.545623 invalid literal for float(): N/A !!!
!!! 2015-04-15 14:59:50.817912 invalid literal for float(): N/A !!!
!!! 2015-04-16 13:59:55.011081 invalid literal for float(): N/A !!!
!!! 2015-04-17 14:00:41.699551 invalid literal for float(): N/A !!!
!!! 2015-04-18 14:19:04.202124 'Yahoo_getter' object has no attribute 'MOD_NAME' !!!
!!! 2015-04-19 14:01:02.140207 invalid literal for float(): N/A !!!
!!! 2015-04-20 14:00:49.288238 invalid literal for float(): N/A !!!
!!! 2015-04-27 13:56:35.228880 invalid literal for float(): N/A !!!
!!! 2015-04-28 13:59:38.645442 invalid literal for float(): N/A !!!
!!! 2015-04-29 14:21:21.182386 invalid literal for float(): helvetica !!!
!!! 2015-04-30 13:59:44.457909 invalid literal for float(): helvetica !!!
!!! 2015-05-01 14:37:14.150637 invalid literal for float(): helvetica !!!
!!! 2015-06-03 17:48:33.648049 not all arguments converted during string formatting !!!
!!! 2015-06-03 17:50:42.925380 not all arguments converted during string formatting !!!
!!! 2015-06-03 17:57:01.522261 could not convert string to float: N/A !!!
!!! 2015-06-03 17:58:03.300027 not all arguments converted during string formatting !!!
!!! 2015-06-03 18:03:36.877545 cannot import name xpath !!!
!!! 2015-06-03 18:03:53.787360 cannot import name xpath !!!
!!! 2015-06-03 18:03:54.935934 cannot import name xpath !!!
!!! 2015-06-03 18:04:08.931734 not all arguments converted during string formatting !!!
!!! 2015-06-03 18:07:05.658250 not all arguments converted during string formatting !!!
!!! 2015-06-03 18:13:13.776442 unsupported format character 'I' (0x49) at index 52 !!!
!!! 2015-06-03 18:14:10.710144 not all arguments converted during string formatting !!!
!!! 2015-06-03 18:14:31.730713 cannot import name xpath !!!
!!! 2015-06-03 18:16:16.884433 cannot import name xpath !!!
!!! 2015-06-04 15:05:08.922863 not all arguments converted during string formatting !!!
!!! 2015-06-04 15:06:43.378952 cannot import name xpath !!!
!!! 2015-06-04 15:08:56.892056 not all arguments converted during string formatting !!!
!!! 2015-06-04 15:26:25.902607 not all arguments converted during string formatting !!! Test
INR
[2015-06-04 18:56:19,293][dc_2015_05_03] INFO:cron-rates:not all arguments converted during string formatting
i deleted some the line because more long file.
when I see in currency are it's not any update.it show last date update 03/04/2015.
from account-financial-tools.
Change your function call in the yahoo getter class (See my previous post above) to the code I've pasted below. Your error is because it is trying to identify where to insert the variable into the URL call and can not find the insert point which is represented by a %s. The URL you have formatted is also missing =X so it is improperly formatting your URL for calling Yahoo. Also, you are running v5 and I am running v7 so while it is unlikely, there is a possibility it will not work as I've not tested in anything other than v7.
def get_updated_currency(self, currency_array, main_currency):
"""implementation of abstract method of Curreny_getter_interface"""
self.validate_cur(main_currency)
url='http://download.finance.yahoo.com/d/quotes.csv?s=%s=X&f=sl1c1abg'
if main_currency in currency_array :
currency_array.remove(main_currency)
for curr in currency_array :
self.validate_cur(curr)
res = self.get_url(url%(main_currency+curr))
val = res.split(',')[1]
if val :
self.updated_currency[curr] = val
else :
raise Exception('Could not update the %s'%(curr))
return self.updated_currency, self.log_info # empty string added by polish changes
from account-financial-tools.
I think this must be merge with the fix?
from account-financial-tools.
The hostname 'download.finance.yahoo.com' no longer resolves. The Yahoo getter should probably be removed/replaced.
from account-financial-tools.
There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.
from account-financial-tools.
Related Issues (20)
- [14.0] account_asset_stock_move cannot create unbalanced journal entry HOT 3
- [16.0]sequence number initialized on invoice in draft
- [ADD] account_reversal_usability
- Migration to version 17.0 HOT 11
- Hello
- Check Deposit Functionality in Odoo HOT 1
- Check Deposit and its Impact in Odoo HOT 3
- account_asset_management: half year depreciation HOT 4
- [16.0] No gap sequences aren't filled in when account_move_name_sequence is installed
- [16.0] Odoo Error While using Account Chart update - Expected singleton
- account_loan: cannot process loans after upgrade from Odoo 12 to 16
- account_chart_update: mass update on several companies HOT 3
- Issue with chronology check between journals in Account Invoice Constraint Chronology Module HOT 1
- ENH: account_spread_cost_revenue, calculation period as start date to end date HOT 3
- [14.0]account_lock_to_date : Error when defining new lock to date
- V[14] Account Asset Management -- When interlink with Vendor Bill (asset profile selected), become not possible to update the bill or asset when any depreciation posted
- [13.0] account_spread_cost_revenue migration: incorrect table name for column rename.
- Issue in Text wrap in label in Account Move Print
- [IMP] account_invoice_constraint_chronology: Prevent Invoice Creation Blockage
- account_move_template error V.17 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from account-financial-tools.