← Back to team overview

savoirfairelinux-openerp team mailing list archive

Re: lp:~dreis-pt/openobject-extension/base_external_dbsource-v7 into lp:openobject-extension

 

@Daniel

I have managed to test it. Everything is working well up to the point where I compute a KPI and execute a query against an external database (MySQL). I got this error message:

Server Traceback (most recent call last):
  File "/home/max/openerp/web/7.0/addons/web/session.py", line 89, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/home/max/openerp/server/7.0/openerp/netsvc.py", line 292, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/home/max/openerp/server/7.0/openerp/service/web_services.py", line 626, in dispatch
    res = fn(db, uid, *params)
  File "/home/max/openerp/server/7.0/openerp/osv/osv.py", line 188, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/home/max/openerp/server/7.0/openerp/osv/osv.py", line 131, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/max/openerp/server/7.0/openerp/osv/osv.py", line 197, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/max/openerp/server/7.0/openerp/osv/osv.py", line 185, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/max/openerp/mgmtsystem/7.0/mgmtsystem_kpi/mgmtsystem_kpi.py", line 294, in compute_kpi_value
    res = dbsrc_obj.execute(obj.kpi_code)
  File "/home/max/openerp/server/7.0/openerp/osv/orm.py", line 374, in function_proxy
    return attr(self._cr, self._uid, [self._id], *args, **kwargs)
  File "/home/max/openerp/local/base_external_dbsource/base_external_dbsource.py", line 140, in execute
    cur = conn.execute(sqlquery, sqlparams)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1449, in execute
    params)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1628, in _execute_text
    statement, parameters
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1691, in _execute_context
    context)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 331, in do_execute
    cursor.execute(statement, parameters)
  File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 159, in execute
    query = query % db.literal(args)
TypeError: not all arguments converted during string formatting

I will do further debugging tomorrow.
-- 
https://code.launchpad.net/~dreis-pt/openobject-extension/base_external_dbsource-v7/+merge/159673
Your team extra-addons-commiter is subscribed to branch lp:openobject-extension.


Follow ups

References