openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #00967
[Bug 889315] [NEW] etl_interface: wrong csv_params when processing csv_in
Public bug reported:
When using the component csv_in on a Job and starting the Process, it
will return an exception because a non-dictionary value was given as
'csv_params' parameter. After some in depth debugging I found the error
to be in /etl_interface/etl_component/input/csv_in.py (ver
6.0.3,revision 5499, Line 49):
val =etl.component.input.csv_in(conn_instance, cmp.csv_params and
eval(cmp.csv_params) or {}, cmp.name, trans_instance, cmp.row_limit)
The problem is, that the 'etl' python library will receive the
parameters in the order that they are given, which will lead to a
complete scramble of variables. Considering how the __init__ function is
defined, the correct way to call this instance would be:
val =etl.component.input.csv_in(conn_instance, name=cmp.name,
transformer=trans_instance, row_limit=cmp.row_limit,
csv_params=(cmp.csv_params and eval(cmp.csv_params) or {}))
Hope it helps.
** Affects: openobject-addons
Importance: Undecided
Status: New
** Tags: etl
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/889315
Title:
etl_interface: wrong csv_params when processing csv_in
Status in OpenERP Addons (modules):
New
Bug description:
When using the component csv_in on a Job and starting the Process, it
will return an exception because a non-dictionary value was given as
'csv_params' parameter. After some in depth debugging I found the
error to be in /etl_interface/etl_component/input/csv_in.py (ver
6.0.3,revision 5499, Line 49):
val =etl.component.input.csv_in(conn_instance, cmp.csv_params
and eval(cmp.csv_params) or {}, cmp.name, trans_instance,
cmp.row_limit)
The problem is, that the 'etl' python library will receive the
parameters in the order that they are given, which will lead to a
complete scramble of variables. Considering how the __init__ function
is defined, the correct way to call this instance would be:
val =etl.component.input.csv_in(conn_instance, name=cmp.name,
transformer=trans_instance, row_limit=cmp.row_limit,
csv_params=(cmp.csv_params and eval(cmp.csv_params) or {}))
Hope it helps.
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/889315/+subscriptions
Follow ups
References