gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnumed-devel] Error with threading.Lock.acquire ()


From: Ian Haywood
Subject: [Gnumed-devel] Error with threading.Lock.acquire ()
Date: Thu, 26 Jun 2003 13:30:41 +1000


This one's got me stumped:

[PANIC] 
(/home/ian/gnumed/gnumed/client/business/gmTmpPatient.py::_get_clinical_record:286):
 cannot instantiate clinical record for patient [%s]
[PANIC] 
(/home/ian/gnumed/gnumed/client/business/gmTmpPatient.py::_get_clinical_record:286):
 exception type : exceptions.TypeError
[PANIC] 
(/home/ian/gnumed/gnumed/client/business/gmTmpPatient.py::_get_clinical_record:286):
 exception value: acquire() takes no keyword arguments
[PANIC] 
(/home/ian/gnumed/gnumed/client/business/gmTmpPatient.py::_get_clinical_record:286):
 Traceback (most recent call last):<#10-0x0A-lf>
[PANIC] 
(/home/ian/gnumed/gnumed/client/business/gmTmpPatient.py::_get_clinical_record:286):
   File "/home/ian/gnumed/gnumed/client/business/gmTmpPatient.py", line 284, in 
_get_clinical_record<#10-0x0A-lf>    self.__db_cache['clinical record'] = 
gmClinicalRecord.gmClinicalRecord(aPKey = self.ID)<#10-0x0A-lf>
[PANIC] 
(/home/ian/gnumed/gnumed/client/business/gmTmpPatient.py::_get_clinical_record:286):
   File "/home/ian/gnumed/gnumed/client/business/gmClinicalRecord.py", line 79, 
in __init__<#10-0x0A-lf>   if not self._register_interests():<#10-0x0A-lf>
[PANIC] 
(/home/ian/gnumed/gnumed/client/business/gmTmpPatient.py::_get_clinical_record:286):
   File "/home/ian/gnumed/gnumed/client/business/gmClinicalRecord.py", line 
159, in _register_interests<#10-0x0A-lf>    if not self._backend.Listen(service 
= 'historica', signal = gmSignals.allergy_add_del_db(), callback = 
self._allergy_added_deleted):<#10-0x0A-lf>
[PANIC] 
(/home/ian/gnumed/gnumed/client/business/gmTmpPatient.py::_get_clinical_record:286):
   File "/home/ian/gnumed/gnumed/client/python-common/gmPG.py", line 196, in 
Listen<#10-0x0A-lf>    listener.register_callback(signal, callback)<#10-0x0A-lf>
[PANIC] 
(/home/ian/gnumed/gnumed/client/business/gmTmpPatient.py::_get_clinical_record:286):
   File "/home/ian/gnumed/gnumed/client/python-common/gmBackendListener.py", 
line 50, in register_callback<#10-0x0A-lf>    self._conn_lock.acquire(blocking 
= 1)<#10-0x0A-lf>
[PANIC] 
(/home/ian/gnumed/gnumed/client/business/gmTmpPatient.py::_get_clinical_record:286):
 TypeError: acquire() takes no keyword arguments<#10-0x0A-lf>

The problem is using Lock.acquire (blocking = 1), changing to Lock.acquire () 
or Lock.acquire (1) fixes it. The problem is, "blocking = 1"
is acceptable according to the docs (and the source of threading.py!)
 
My version of python is 2.2.3-2.1 (Debian unstable)


Ian Haywood


Attachment: pgpGdxfYGaWf9.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]