I am trying to apply weights of evidence transformation to my data. I am trying to bin my data with the sc.woebin command, however, this: "sequence item 0: expected str instance, int found" error keeps on showing up. I have no clue as to what i could be doing wrong?
I have no clue as to why is it not working.I have tried different server, switching it up a bit, but i don't know what exactly is the problem and what exactly the error means in my case.
bins = sc.woebin(train, y = 'BAD',
min_perc_fine_bin=0.02,
min_perc_coarse_bin=0.05,
stop_limit=0.1,
max_num_bin=8,
method='tree')
The expected result should be of it just processing the data. However, following is the actual result.
"""
"""
Traceback (most recent call last):
File "/usr/lib/python3.6/multiprocessing/pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "/usr/lib/python3.6/multiprocessing/pool.py", line 47, in starmapstar
return list(itertools.starmap(args[0], args[1]))
File "/usr/local/lib/python3.6/dist-packages/scorecardpy/woebin.py", line 702, in woebin2
stop_limit=stop_limit, max_num_bin=max_num_bin, breaks=breaks, spl_val=spl_val)
File "/usr/local/lib/python3.6/dist-packages/scorecardpy/woebin.py", line 486, in woebin2_tree
binning_tree = woebin2_tree_add_1brkp(dtm, initial_binning, min_perc_coarse_bin, bestbreaks)
File "/usr/local/lib/python3.6/dist-packages/scorecardpy/woebin.py", line 446, in woebin2_tree_add_1brkp
bin_add_1bst = binning_add_1bst(initial_binning, bestbreaks)
File "/usr/local/lib/python3.6/dist-packages/scorecardpy/woebin.py", line 423, in binning_add_1bst
.agg({'good':sum, 'bad':sum, 'bin':lambda x:'%,%'.join(x)}).reset_index()\
File "/usr/local/lib/python3.6/dist-packages/pandas/core/groupby/generic.py", line 1315, in aggregate
return super(DataFrameGroupBy, self).aggregate(arg, *args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/pandas/core/groupby/generic.py", line 186, in aggregate
result, how = self._aggregate(arg, _level=_level, *args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/pandas/core/base.py", line 498, in _aggregate
result = _agg(arg, _agg_1dim)
File "/usr/local/lib/python3.6/dist-packages/pandas/core/base.py", line 449, in _agg
result[fname] = func(fname, agg_how)
File "/usr/local/lib/python3.6/dist-packages/pandas/core/base.py", line 432, in _agg_1dim
return colg.aggregate(how, _level=(_level or 0) + 1)
File "/usr/local/lib/python3.6/dist-packages/pandas/core/groupby/generic.py", line 773, in aggregate
return self._python_agg_general(func_or_funcs, *args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/pandas/core/groupby/groupby.py", line 856, in _python_agg_general
return self._python_apply_general(f)
File "/usr/local/lib/python3.6/dist-packages/pandas/core/groupby/groupby.py", line 707, in _python_apply_general
self.axis)
File "/usr/local/lib/python3.6/dist-packages/pandas/core/groupby/ops.py", line 190, in apply
res = f(group)
File "/usr/local/lib/python3.6/dist-packages/pandas/core/groupby/groupby.py", line 844, in <lambda>
f = lambda x: func(x, *args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/scorecardpy/woebin.py", line 423, in <lambda>
.agg({'good':sum, 'bad':sum, 'bin':lambda x:'%,%'.join(x)}).reset_index()\
TypeError: sequence item 0: expected str instance, int found
"""
The above exception was the direct cause of the following exception:
TypeError Traceback (most recent call last)
<ipython-input-209-aa1b22b28748> in <module>()
4 stop_limit=0.1,
5 max_num_bin=10,
----> 6 method='tree')
2 frames
/usr/lib/python3.6/multiprocessing/pool.py in get(self, timeout)
642 return self._value
643 else:
--> 644 raise self._value
645
646 def _set(self, i, obj):
TypeError: sequence item 0: expected str instance, int found
EDIT: This is what my train looks like:
1
Related
I'm pretty new in Odoo, for the moment I dind't modified any code but this error is persistent when I try to create a new product.
Traceback (most recent call last):
File "/opt/odoo/odoo/odoo/tools/cache.py", line 85, in lookup
r = d[key]
File "/opt/odoo/odoo/odoo/tools/func.py", line 71, in wrapper
return func(self, *args, **kwargs)
File "/opt/odoo/odoo/odoo/tools/lru.py", line 34, in __getitem__
a = self.d[obj]
KeyError: ('product.template', <function ProductTemplate._get_default_category_id at 0x7f77854ab490>)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/odoo/odoo/odoo/tools/cache.py", line 85, in lookup
r = d[key]
File "/opt/odoo/odoo/odoo/tools/func.py", line 71, in wrapper
return func(self, *args, **kwargs)
File "/opt/odoo/odoo/odoo/tools/lru.py", line 34, in __getitem__
a = self.d[obj]
KeyError: ('ir.model.data', <function IrModelData._xmlid_lookup at 0x7f778a47b1c0>, 'product.product_category_all')
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/odoo/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "/opt/odoo/odoo/odoo/http.py", line 687, in dispatch
result = self._call_function(**self.params)
File "/opt/odoo/odoo/odoo/http.py", line 359, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo/odoo/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoo/odoo/odoo/http.py", line 348, in checked_call
result = self.endpoint(*a, **kw)
File "/opt/odoo/odoo/odoo/http.py", line 916, in __call__
return self.method(*args, **kw)
File "/opt/odoo/odoo/odoo/http.py", line 535, in response_wrap
response = f(*args, **kw)
File "/opt/odoo/odoo/addons/web/controllers/main.py", line 1347, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/opt/odoo/odoo/addons/web/controllers/main.py", line 1339, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/opt/odoo/odoo/odoo/api.py", line 464, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/opt/odoo/odoo/odoo/api.py", line 451, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/opt/odoo/odoo/odoo/models.py", line 6356, in onchange
defaults = self.default_get(missing_names)
File "/opt/odoo/odoo/odoo/models.py", line 1410, in default_get
defaults[name] = field.default(self)
File "<decorator-gen-151>", line 2, in _get_default_category_id
File "/opt/odoo/odoo/odoo/tools/cache.py", line 90, in lookup
value = d[key] = self.method(*args, **kwargs)
File "/opt/odoo/odoo/addons/product/models/product_template.py", line 24, in _get_default_category_id
return self.env.ref('product.product_category_all')
File "/opt/odoo/odoo/odoo/api.py", line 578, in ref
res_model, res_id = self['ir.model.data']._xmlid_to_res_model_res_id(
File "/opt/odoo/odoo/odoo/addons/base/models/ir_model.py", line 1935, in _xmlid_to_res_model_res_id
return self._xmlid_lookup(xmlid)[1:3]
File "<decorator-gen-35>", line 2, in _xmlid_lookup
File "/opt/odoo/odoo/odoo/tools/cache.py", line 90, in lookup
value = d[key] = self.method(*args, **kwargs)
File "/opt/odoo/odoo/odoo/addons/base/models/ir_model.py", line 1928, in _xmlid_lookup
raise ValueError('External ID not found in the system: %s' % xmlid)
Exception
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/odoo/odoo/odoo/http.py", line 643, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo/odoo/odoo/http.py", line 301, in _handle_exception
raise exception.with_traceback(None) from new_cause
ValueError: External ID not found in the system: product.product_category_all
A little of backstory, I imported a lot of products, atributes and categories and did some testing deleting and importing again that is probably the origin of the issue.
The external ID product.product_category_all should be one of the default product categories introduced/installed by the app/module "product".
Obviously Odoo is using this one as a default value and you get an error, because it was deleted.
The easiest fix is to just update the app/module "product". Odoo will recreate the category and the error should be gone.
I don't know where my problem is. Because years is char field must be string not bool.
I feel really frustrated. What can I do to fix this problem?
Any sort of help will be much appreciated!
Please give me some suggestions. Thanks!
Here is my code:
class HreDetailList(models.EcoModel):
_name = "hre.detail.list"
def _compute_holiday_flag(self):
for record in self:
record.work_on_holiday = False
now_year = int(record.years[:4])
next_year = now_year + 1
holiday_obj = self.env['hra.holiday']
holiday_data = holiday_obj.search([('holi_yy', 'ilike', next_year),
('holi_name', '=', 'Xmas')])
change_obj = self.env['hre.changedtl']
change_data = change_obj.search([('hre_empbas_id.emp_no', '=', record.emp_no),
('trans_flag', '=', True),
('lt_startdate', '=like', record.years[:4] + '%')])
for change_datadtl in change_data:
if change_datadtl.chg_kind == '6M' or change_datadtl.chg_kind == '6N' or change_datadtl.chg_kind == '6L':
if holiday_data.holi_date >= change_datadtl.lt_startdate and holiday_data.holi_date <= change_datadtl.lt_enddate:
record.work_on_holiday = True
break
else:
record.work_on_holiday = False
years = fields.Char(string='Year', size=7, required=True)
work_on_holiday = fields.Boolean(compute=_compute_holiday_flag, string='Work on holiday')
I am getting following error: TypeError: 'bool' object is not subscriptable:
Odoo Server Error
Traceback (most recent call last):
File "/vagrant/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "/vagrant/odoo/odoo/http.py", line 682, in dispatch
result = self._call_function(**self.params)
File "/vagrant/odoo/odoo/http.py", line 358, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/vagrant/odoo/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/vagrant/odoo/odoo/http.py", line 346, in checked_call
result = self.endpoint(*a, **kw)
File "/vagrant/odoo/odoo/http.py", line 911, in __call__
return self.method(*args, **kw)
File "/vagrant/odoo/odoo/http.py", line 530, in response_wrap
response = f(*args, **kw)
File "/vagrant/odoo/addons/web/controllers/main.py", line 1359, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/vagrant/odoo/addons/web/controllers/main.py", line 1351, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/vagrant/odoo/odoo/api.py", line 396, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/vagrant/odoo/odoo/api.py", line 383, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/vagrant/odoo/odoo/models.py", line 6165, in onchange
value = record[name]
File "/vagrant/odoo/odoo/models.py", line 5640, in __getitem__
return self._fields[key].__get__(self, type(self))
File "/vagrant/odoo/odoo/fields.py", line 972, in __get__
self.compute_value(recs)
File "/vagrant/odoo/odoo/fields.py", line 1111, in compute_value
records._compute_field_value(self)
File "/vagrant/odoo/odoo/models.py", line 4037, in _compute_field_value
field.compute(self)
File "/vagrant/odoo/addons/hre_formwork/models/hre_formwork.py", line 3887, in_compute_holiday_flag
now_year = int(record.years[:4])
Exception
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/vagrant/odoo/odoo/http.py", line 638, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/vagrant/odoo/odoo/http.py", line 314, in _handle_exception
raise exception.with_traceback(None) from new_cause
TypeError: 'bool' object is not subscriptable
def lag1(x):
return x[(len(x)-1)]
x=pd.Series([12,3,4,5,6])
lag1(x)
Out[65]: 6
dat.shape
Out[70]: (247619, 33)
d2=dat.groupby('PATID_CD').agg(lag1)
Traceback (most recent call last):
File "<ipython-input-71-f514757a3da8>", line 1, in <module>
d2=dat.groupby('PATID_CD').agg(lag1)
File "D:\Users\shan xu\Anaconda3\lib\site-packages\pandas\core\groupby\groupby.py", line 4658, in aggregate
return super(DataFrameGroupBy, self).aggregate(arg, *args, **kwargs)
File "D:\Users\shan xu\Anaconda3\lib\site-packages\pandas\core\groupby\groupby.py", line 4109, in aggregate
result = self._aggregate_generic(arg, *args, **kwargs)
File "D:\Users\shan xu\Anaconda3\lib\site-packages\pandas\core\groupby\groupby.py", line 4133, in _aggregate_generic
return self._aggregate_item_by_item(func, *args, **kwargs)
File "D:\Users\shan xu\Anaconda3\lib\site-packages\pandas\core\groupby\groupby.py", line 4162, in _aggregate_item_by_item
colg.aggregate(func, *args, **kwargs), data)
File "D:\Users\shan xu\Anaconda3\lib\site-packages\pandas\core\groupby\groupby.py", line 3497, in aggregate
result = self._aggregate_named(func_or_funcs, *args, **kwargs)
File "D:\Users\shan xu\Anaconda3\lib\site-packages\pandas\core\groupby\groupby.py", line 3627, in _aggregate_named
output = func(group, *args, **kwargs)
File "<ipython-input-64-be977293b7b9>", line 2, in lag1
return x[(len(x)-1)]
File "D:\Users\shan xu\Anaconda3\lib\site-packages\pandas\core\series.py", line 766, in __getitem__
result = self.index.get_value(self, key)
File "D:\Users\shan xu\Anaconda3\lib\site-packages\pandas\core\indexes\base.py", line 3103, in get_value
tz=getattr(series.dtype, 'tz', None))
File "pandas\_libs\index.pyx", line 106, in pandas._libs.index.IndexEngine.get_value
File "pandas\_libs\index.pyx", line 114, in pandas._libs.index.IndexEngine.get_value
File "pandas\_libs\index.pyx", line 162, in pandas._libs.index.IndexEngine.get_loc
File "pandas\_libs\hashtable_class_helper.pxi", line 958, in pandas._libs.hashtable.Int64HashTable.get_item
File "pandas\_libs\hashtable_class_helper.pxi", line 964, in pandas._libs.hashtable.Int64HashTable.get_item
KeyError: 23
I don'tknow why my function not working, it gives me a keyerror which suggests the name does not exist. this is a little bit confusing. Am I doing the correct way, or there might be the other solution?
dat.groupby('PATID_CD').agg('mean')
Out[73]:
MONTH_LOOKBACK_NR CCYYMM_CD ... ENG_SPOKEN EVENT_FL
PATID_CD ...
584 12.0 201556.500000 ... 1.0 0.0
4277 12.0 201556.500000 ... 1.0 0.0
I also tried:
dat.groupby('PATID_CD').agg(lambda x : x.iloc[-1,:])
This one is good, but I cannot put this function into a list that compute with the other functions:
def lag1(x):
return x.iloc[-1,:]
d2=dat.groupby(dat['PATID_CD']).agg({'mean','max','min','std','skew', lambda x:len(x),kurtosis,lag1})
Traceback (most recent call last):
File "<ipython-input-86-ac95a8297b5c>", line 1, in <module>
d2=dat.groupby(dat['PATID_CD']).agg({'mean','max','min','std','skew', lambda x:len(x),kurtosis,lag1})
File "D:\Users\shan xu\Anaconda3\lib\site-packages\pandas\core\groupby\groupby.py", line 4658, in aggregate
return super(DataFrameGroupBy, self).aggregate(arg, *args, **kwargs)
File "D:\Users\shan xu\Anaconda3\lib\site-packages\pandas\core\groupby\groupby.py", line 4089, in aggregate
result, how = self._aggregate(arg, _level=_level, *args, **kwargs)
File "D:\Users\shan xu\Anaconda3\lib\site-packages\pandas\core\base.py", line 551, in _aggregate
_axis=_axis), None
File "D:\Users\shan xu\Anaconda3\lib\site-packages\pandas\core\base.py", line 596, in _aggregate_multiple_funcs
results.append(colg.aggregate(arg))
File "D:\Users\shan xu\Anaconda3\lib\site-packages\pandas\core\groupby\groupby.py", line 3485, in aggregate
(_level or 0) + 1)
File "D:\Users\shan xu\Anaconda3\lib\site-packages\pandas\core\groupby\groupby.py", line 3558, in _aggregate_multiple_funcs
results[name] = obj.aggregate(func)
File "D:\Users\shan xu\Anaconda3\lib\site-packages\pandas\core\groupby\groupby.py", line 3497, in aggregate
result = self._aggregate_named(func_or_funcs, *args, **kwargs)
File "D:\Users\shan xu\Anaconda3\lib\site-packages\pandas\core\groupby\groupby.py", line 3627, in _aggregate_named
output = func(group, *args, **kwargs)
File "<ipython-input-85-6bbffa1ca952>", line 2, in lag1
return x.iloc[-1,:]
File "D:\Users\shan xu\Anaconda3\lib\site-packages\pandas\core\indexing.py", line 1472, in __getitem__
return self._getitem_tuple(key)
File "D:\Users\shan xu\Anaconda3\lib\site-packages\pandas\core\indexing.py", line 2013, in _getitem_tuple
self._has_valid_tuple(tup)
File "D:\Users\shan xu\Anaconda3\lib\site-packages\pandas\core\indexing.py", line 220, in _has_valid_tuple
raise IndexingError('Too many indexers')
IndexingError: Too many indexers
The same as this one:
x=pd.Series([12,3,4,5,6])
lag1(x)
Traceback (most recent call last):
File "<ipython-input-85-6bbffa1ca952>", line 5, in <module>
lag1(x)
File "<ipython-input-85-6bbffa1ca952>", line 2, in lag1
return x.iloc[-1,:]
File "D:\Users\shan xu\Anaconda3\lib\site-packages\pandas\core\indexing.py", line 1472, in __getitem__
return self._getitem_tuple(key)
File "D:\Users\shan xu\Anaconda3\lib\site-packages\pandas\core\indexing.py", line 2013, in _getitem_tuple
self._has_valid_tuple(tup)
File "D:\Users\shan xu\Anaconda3\lib\site-packages\pandas\core\indexing.py", line 220, in _has_valid_tuple
raise IndexingError('Too many indexers')
IndexingError: Too many indexers
You haven't explained what you are trying to accomplish and it is not clear from your code. I don't have enough rep here to add this as a comment so consider:
1) Your first example is performed on a Series that implicitly uses a RangeIndex, so x[(5-1)] == 6. Your second example appears to be a DataFrame for which PATID_CD is the index. If PATID_CD.dtype is e.g. object, you will get a KeyError exception simply because you have passed the wrong argument type (an int) into a pandas indexing expression DataFrame[label] docs.
2) If you simply want to extract the last row of a group, write your groupby call something like
dat.groupby('PATID_CD').apply(lambda x: x.iloc[-1, :])
So far i had read many questions but i am sure that i am total a mix up because i am unable understand how to use Search at odoo TransientModel.
I had written a code that get Active_ids from self
context=self.env.context.get('active_ids')
I am supposing these actives_ids as
product_tmpl_id but when i tried to use them
product_recs = produtc_obj.search([('product_tmpl_id', 'in', context)])
print(product_recs)
result = {}
for rec in product_recs:
print(rec.default_code )
result[rec.default_code ]
but its always return
result[rec.default_code ]
KeyError: '1'
Here is my full code
import logging
from odoo import models, fields, api
from odoo.exceptions import Warning
_logger = logging.getLogger(__name__)
class product_export_to_rakuten(models.TransientModel):
_name = 'rakuten_ftp.export_product'
#api.multi
def export_products(self):
# check for more than one orders.
# print(self.env)
context=self.env.context.get('active_ids')
produtc_obj = self.env['product.product']
product_recs = produtc_obj.search([('product_tmpl_id', 'in', context)])
print(product_recs)
result = {}
for rec in product_recs:
print(rec.default_code )
result[rec.default_code ]
Here is the Error
Traceback (most recent call last):
File "C:/Odoo_Source_Codes/odoo11\odoo\http.py", line 647, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "C:/Odoo_Source_Codes/odoo11\odoo\http.py", line 307, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "C:/Odoo_Source_Codes/odoo11\odoo\tools\pycompat.py", line 87, in reraise
raise value
File "C:/Odoo_Source_Codes/odoo11\odoo\http.py", line 689, in dispatch
result = self._call_function(**self.params)
File "C:/Odoo_Source_Codes/odoo11\odoo\http.py", line 339, in _call_function
return checked_call(self.db, *args, **kwargs)
File "C:/Odoo_Source_Codes/odoo11\odoo\service\model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "C:/Odoo_Source_Codes/odoo11\odoo\http.py", line 332, in checked_call
result = self.endpoint(*a, **kw)
File "C:/Odoo_Source_Codes/odoo11\odoo\http.py", line 933, in __call__
return self.method(*args, **kw)
File "C:/Odoo_Source_Codes/odoo11\odoo\http.py", line 512, in response_wrap
response = f(*args, **kw)
File "C:\Odoo_Source_Codes\odoo11\addons\web\controllers\main.py", line 934, in call_button
action = self._call_kw(model, method, args, {})
File "C:\Odoo_Source_Codes\odoo11\addons\web\controllers\main.py", line 922, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "C:/Odoo_Source_Codes/odoo11\odoo\api.py", line 689, in call_kw
return call_kw_multi(method, model, args, kwargs)
File "C:/Odoo_Source_Codes/odoo11\odoo\api.py", line 680, in call_kw_multi
result = method(recs, *args, **kwargs)
File "C:\Odoo_Source_Codes\odoo11\custom_addons\rakuten_ftp\wizard\export_product.py", line 22, in export_products
result[rec.default_code ]
KeyError: '1'
Everything seems to be fine with the Transient Model, the problem is that you're trying to read a dictionary value whose key doesn't exist yet. I mean, the default_code of the first product you get in the loop is 1, and you're telling Python: I want to read the value of the key 1 of the dictionary result, but this one is empty, so you get the error (you need to fill it in first).
You can reply the error in a Python console, this is what is happening to you:
>>> result = {}
>>> result['1']
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
KeyError: '1'
You should do something like this to make it work:
>>> result = {}
>>> result['1'] = 'Your value' # result.update({'1': 'Your value', })
>>> result['1']
'Your value'
I am getting this strange error when trying to synchronize terms in Openerp 7.
I had imported some terms for german language through a CSV file before but now I only have English installed.
OpenERP Server Error
Client Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/openerp-7.0_20131124_002547-py2.6.egg/openerp/addons/web/http.py", line 204, in dispatch
response["result"] = method(self, **self.params)
File "/usr/lib/python2.6/site-packages/openerp-7.0_20131124_002547-py2.6.egg/openerp/addons/web/controllers/main.py", line 1132, in call_button
action = self._call_kw(req, model, method, args, {})
File "/usr/lib/python2.6/site-packages/openerp-7.0_20131124_002547-py2.6.egg/openerp/addons/web/controllers/main.py", line 1120, in _call_kw
return getattr(req.session.model(model), method)(*args, **kwargs)
File "/usr/lib/python2.6/site-packages/openerp-7.0_20131124_002547-py2.6.egg/openerp/addons/web/session.py", line 42, in proxy
result=self.proxy.execute_kw(self.session._db,self.session._uid,self.session._password, self.model, method, args, kw)
File "/usr/lib/python2.6/site-packages/openerp-7.0_20131124_002547-py2.6.egg/openerp/addons/web/session.py", line 30, in proxy_method
result = self.session.send(self.service_name, method, *args)
File "/usr/lib/python2.6/site-packages/openerp-7.0_20131124_002547-py2.6.egg/openerp/addons/web/session.py", line 103, in send
raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)
Server Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/openerp-7.0_20131124_002547-py2.6.egg/openerp/addons/web/session.py", line 89, in send
return openerp.netsvc.dispatch_rpc(service_name, method, args)
File "/usr/lib/python2.6/site-packages/openerp-7.0_20131124_002547-py2.6.egg/openerp/netsvc.py", line 292, in dispatch_rpc
result = ExportService.getService(service_name).dispatch(method, params)
File "/usr/lib/python2.6/site-packages/openerp-7.0_20131124_002547-py2.6.egg/openerp/service/web_services.py", line 626, in dispatch
res = fn(db, uid, *params)
File "/usr/lib/python2.6/site-packages/openerp-7.0_20131124_002547-py2.6.egg/openerp/osv/osv.py", line 188, in execute_kw
return self.execute(db, uid, obj, method, *args, **kw or {})
File "/usr/lib/python2.6/site-packages/openerp-7.0_20131124_002547-py2.6.egg/openerp/osv/osv.py", line 131, in wrapper
return f(self, dbname, *args, **kwargs)
File "/usr/lib/python2.6/site-packages/openerp-7.0_20131124_002547-py2.6.egg/openerp/osv/osv.py", line 197, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/usr/lib/python2.6/site-packages/openerp-7.0_20131124_002547-py2.6.egg/openerp/osv/osv.py", line 185, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/usr/lib/python2.6/site-packages/openerp-7.0_20131124_002547-py2.6.egg/openerp/addons/base/module/wizard/base_update_translations.py", line 47, in act_update
tools.trans_export(this.lang, ['all'], buf, 'csv', cr)
File "/usr/lib/python2.6/site-packages/openerp-7.0_20131124_002547-py2.6.egg/opener/tools/translate.py", line 496, in trans_export
translations = trans_generate(lang, modules, cr)
File "/usr/lib/python2.6/site-packages/openerp-7.0_20131124_002547-py2.6.egg/opener/tools/translate.py", line 788, in trans_generate
push_translation(module, 'model', name, xml_name, encode(trad))
File "/usr/lib/python2.6/site-packages/openerp-7.0_20131124_002547-py2.6.egg/opener/tools/translate.py", line 648, in push_translation
if not source or len(source.strip()) <= 1:
AttributeError: 'bool' object has no attribute 'strip'
I found the following solution to my problem:
I had set a few custom boolean fields to "translatable" in my models. Un-checking the "translatable" property on them removed the errors.