[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnumed-devel] tried different call
From: |
sjtan |
Subject: |
[Gnumed-devel] tried different call |
Date: |
01 Jun 2003 11:40:29 +1000 |
I tried calling quickROQuery if the other call failed,
and I get the same error message.
I think the connection object can go dead but still be referenceable
and produce a cursor object, but only detected as dead when a sql
statement is attempted on the cursor object.
>From gmPG.py:
def quickROQuery(query, service='default'):
"""a quick read-only query that fetches all possible results at
once
returns the tuple containing the fetched rows and the cursor
'description' object"""
dbp = ConnectionPool()
con = dbp.GetConnection(service)
cur=con.cursor()
cur.execute(query)
return cur.fetchall(), cur.description
Error message:
def OnSearchResultKeyDown(self, event):
[INFO]
(/home/sjtan/gnumed/gnumed/client/python-common/gmLog.py::Info:181):
kwargs for PATIENT = {'dob': '1970-01-01 00:00:00.00', 'n_id': '3',
'cob': 'DE', 'firstnames': 'Horst', 'gender': 'm', 'title': 'Dr.', 'id':
'3', 'lastnames': 'Herb', 'ID': 3, 'i_id': '3'}
received patient_selected notification
{'n_id': '3', 'sender': 'patient.selector', 'title': 'Dr.', 'dob':
'1970-01-01 00:00:00.00', 'gender': 'm', 'signal': 'patient_selected',
'ID': 3, 'cob': 'DE', 'firstnames': 'Horst', 'lastnames': 'Herb',
'i_id': '3', 'id': '3'}
[INFO]
(/home/sjtan/gnumed/gnumed/client/python-common/gmLog.py::Info:181):
date part = 1970-01-01
[INFO]
(/home/sjtan/gnumed/gnumed/client/python-common/gmLog.py::Info:181):
Running query : select id from identity where id = 3
[PANIC]
(/home/sjtan/gnumed/gnumed/client/python-common/gmPG.py::run_query:498):
query >>>select id from identity where id = 3<<< failed
[PANIC]
(/home/sjtan/gnumed/gnumed/client/python-common/gmPG.py::run_query:498):
exception type : libpq.Warning
[PANIC]
(/home/sjtan/gnumed/gnumed/client/python-common/gmPG.py::run_query:498):
exception value: WARNING: PerformPortalClose: portal "pgsql_08766084"
not found
[PANIC]
(/home/sjtan/gnumed/gnumed/client/python-common/gmPG.py::run_query:498):
Traceback (most recent call last):<#10-0x0A-lf>
[PANIC]
(/home/sjtan/gnumed/gnumed/client/python-common/gmPG.py::run_query:498): File
"/home/sjtan/gnumed/gnumed/client/python-common/gmPG.py", line 496, in
run_query<#10-0x0A-lf> aCursor.execute(aCmd)<#10-0x0A-lf>
[PANIC]
(/home/sjtan/gnumed/gnumed/client/python-common/gmPG.py::run_query:498): File
"/usr/local/lib/python2.2/site-packages/pyPgSQL/PgSQL.py", line 2953, in
execute<#10-0x0A-lf> raise Warning, self.conn.notices.pop()<#10-0x0A-lf>
[PANIC]
(/home/sjtan/gnumed/gnumed/client/python-common/gmPG.py::run_query:498):
Warning: WARNING: PerformPortalClose: portal "pgsql_08766084" not
found<#10-0x0A-lf><#10-0x0A-lf>
[ERROR]
(/home/sjtan/gnumed/gnumed/client/business/gmClinicalRecord.py::execute:342):
Unable to check existence of id 3 in identity
[PANIC]
(/home/sjtan/gnumed/gnumed/client/business/gmClinicalRecord.py::_pkey_exists:105):
>>>select id from identity where id = 3<<< failed
[PANIC]
(/home/sjtan/gnumed/gnumed/client/business/gmClinicalRecord.py::_pkey_exists:105):
exception type : libpq.Warning
[PANIC]
(/home/sjtan/gnumed/gnumed/client/business/gmClinicalRecord.py::_pkey_exists:105):
exception value: WARNING: PerformPortalClose: portal "pgsql_0873e7ac" not
found
[PANIC]
(/home/sjtan/gnumed/gnumed/client/business/gmClinicalRecord.py::_pkey_exists:105):
Traceback (most recent call last):<#10-0x0A-lf>
[PANIC]
(/home/sjtan/gnumed/gnumed/client/business/gmClinicalRecord.py::_pkey_exists:105):
File "/home/sjtan/gnumed/gnumed/client/business/gmClinicalRecord.py", line
103, in _pkey_exists<#10-0x0A-lf> rows, description = gmPG.quickROQuery(
cmd)<#10-0x0A-lf>
[PANIC]
(/home/sjtan/gnumed/gnumed/client/business/gmClinicalRecord.py::_pkey_exists:105):
File "/home/sjtan/gnumed/gnumed/client/python-common/gmPG.py", line 481, in
quickROQuery<#10-0x0A-lf> cur.execute(query)<#10-0x0A-lf>
[PANIC]
(/home/sjtan/gnumed/gnumed/client/business/gmClinicalRecord.py::_pkey_exists:105):
File "/usr/local/lib/python2.2/site-packages/pyPgSQL/PgSQL.py", line 2953,
in execute<#10-0x0A-lf> raise Warning, self.conn.notices.pop()<#10-0x0A-lf>
[PANIC]
(/home/sjtan/gnumed/gnumed/client/business/gmClinicalRecord.py::_pkey_exists:105):
Warning: WARNING: PerformPortalClose: portal "pgsql_0873e7ac" not
found<#10-0x0A-lf><#10-0x0A-lf>
Traceback (most recent call last):
File "/home/sjtan/gnumed/gnumed/client/wxpython/gmSQLSimpleSearch.py",
line 110, in OnSearchResultItemActivated
self.ProcessSelection(self.selected)
File "/home/sjtan/gnumed/gnumed/client/wxpython/gmSelectPerson.py",
line 107, in ProcessSelection
gmDispatcher.send(gmSignals.patient_selected(), kwds=kwargs)
File "/home/sjtan/gnumed/gnumed/client/python-common/gmDispatcher.py",
line 137, in send response = _call(receiver, signal=signal,
sender=sender, **kwds)
File "/home/sjtan/gnumed/gnumed/client/python-common/gmDispatcher.py",
line 161, in _call
return receiver(**kwds)
File "/home/sjtan/gnumed/gnumed/client/business/gmTmpPatient.py", line
650, in _patient_selected
adjust_data(kwargs)
File "/home/sjtan/gnumed/gnumed/client/business/gmTmpPatient.py", line
662, in adjust_data
map['clinical record'] =
gmClinicalRecord.gmClinicalRecord(map['ID'])
File "/home/sjtan/gnumed/gnumed/client/business/gmClinicalRecord.py",
line 50, in __init__
raise gmExceptions.ConstructorError, "No patient with ID [%s] in
database." % aPKey
gmExceptions.ConstructorError: No patient with ID [3] in database.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnumed-devel] tried different call,
sjtan <=