![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
dbxml 2.2.13 bsddb3-4.3.3 python 2.4.1 |
|
Hello, Am observing a bizarre problem with dbxml and Python on Windows XP. Versions as follows: dbxml 2.2.13 bsddb3-4.3.3 python 2.4.1 Code as follows: ENV_NAME = "C:/dbxml" DB_NAME = "RefData" ENV = DBEnv() ENV.open (ENV_NAME, DB_CREATE|DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_MPOOL|D B_INIT_TXN, 0) MGR = XmlManager(ENV, 0) exists = MGR.existsContainer(DB_NAME) if not exists: CONTAINER = MGR.createContainer (DB_NAME) else: CONTAINER = MGR.openContainer (DB_NAME) try: print "Before query" query = 'collection("RefData")/instrument[security_typ="Common Stock"]' #query = 'collection("RefData")/instrument' qc = MGR.createQueryContext() print "Created query context" preparedQuery = MGR.prepare (query, qc) print "prepared query" results = preparedQuery.execute (qc) *************** except ..... In the above query I am doing the equivalent of an SQL "where" clause: I want to get all the documents which have the following pattern instrument security>Common Stock</security ... /instrument This query fails at the starred line; it prints the error "Error: Could not fetch DOM element for doc id: xx" and Python exits with a windows appilcation error "The instruction at xxxxx referenced memory at xxxx. The memory could not be written". The very odd thing is that if I do the query which is commented out, that is, a generic query for all instruments, it succeeds without any errors. I'm at my wits' end; have reinstalled everything. To make matters worse a colleague can run the same code with no errors. Before I try rebuilding Python and dbxml on my machine I thought I would post this here. Any help appreciated. Regards, PC |
![]() |
| Thread Tools | |
| Display Modes | |
| |