← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 865956] Re: In Warehouse : When Run The Copmpute Schedular :

 

Hello,

After digging a bit in detail I found that the problem is from the procurements/wizard/schedulers_all.py @line 61
The code *threaded_calculation.start()* i.e the thread is started by using *start* method which will arrange for the object’s run() method to be invoked in a separate thread of control. and will execute the next statement but will not call the "Callable" from its args. so the *cr* (cursor) arg passed to the callable will be closed before the thread actually calls the method.

A workaround is to user thread.run() so that the method is called before
the cursor object gets closed.


Correct me if I am missing something !

@community Team: please re change the project :)


Thanks,

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to OpenERP Project Group.
https://bugs.launchpad.net/bugs/865956

Title:
  In Warehouse : When Run The Copmpute Schedular :

Status in OpenERP Server:
  Confirmed

Bug description:
  Problem : In Warehouse : When Run The Copmpute Schedular :
              Warehouse --> Schedular --> Compute Schedular .
               Find out traceback at servar Side :
              ============================================================
               Traceback (most recent call last):
                File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
                  self.run()
                File "/usr/lib/python2.6/threading.py", line 484, in run
                  self.__target(*self.__args, **self.__kwargs)
                File "/home/amb/source/addons/trunk/procurement/wizard/schedulers_all.py", line 48, in _procure_calculation_all
                  proc_obj.run_scheduler(cr, uid, automatic=proc.automatic, use_new_cursor=cr.dbname,\
                File "/home/amb/source/server/trunk/openerp/osv/orm.py", line 456, in __getattr__
                  return self[name]
                File "/home/amb/source/server/trunk/openerp/osv/orm.py", line 369, in __getitem__
                  field_values = self._table.read(self._cr, self._uid, ids, field_names, context=self._context, load="_classic_write")
                File "/home/amb/source/server/trunk/openerp/osv/orm.py", line 3197, in read
                  result = self._read_flat(cr, user, select, fields, context, load)
                File "/home/amb/source/server/trunk/openerp/osv/orm.py", line 3256, in _read_flat
                  cr.execute(query, (tuple(sub_ids),))
                File "/home/amb/source/server/trunk/openerp/sql_db.py", line 152, in wrapper
                  raise psycopg2.OperationalError(msg)
              OperationalError: Unable to use a closed cursor.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/865956/+subscriptions


References