Vizcayno Tamparantan
2006-Aug-03 05:22 UTC
[Xapian-discuss] An error while testing Python 2.5 and xapian in Win32
Hi: After a succesful installation of .dll xapian using VS2005 and swigwin-1.3.29, I attempted to do my first tests, however, I had the next problem: .python Python 2.5b2 (r25b2:50512, Jul 11 2006, 10:16:14) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information.>>> >>>import sys >>>sys.path.append("C:/Python25/Lib/site-packages/Xapian") >>>from _xapian import * >>>from _xapian import new_WritableDatabase, new_Document >>>w=new_WritableDatabase("db",DB_CREATE_OR_OPEN) >>>d=new_Document() >>>del dswig/python detected a memory leak of type 'Xapian::Document *', no destructor found.>>>If a try to print d, windows crashes indicating: Faulting application python.exe, version 0.0.0.0, faulting module ntdll.dll, version 5.1.2600.2180, fault address 0x00018fea. What do yot think is happening? Thanks!! _________________________________________________________________ Las mejores tiendas, los precios mas bajos, entregas en todo el mundo, YupiMSN Compras: http://latam.msn.com/compras/
Olly Betts
2006-Aug-23 13:44 UTC
[Xapian-discuss] An error while testing Python 2.5 and xapian in Win32
On Thu, Aug 03, 2006 at 12:21:34AM -0400, Vizcayno Tamparantan wrote:> >>>import sys > >>>sys.path.append("C:/Python25/Lib/site-packages/Xapian") > >>>from _xapian import * > >>>from _xapian import new_WritableDatabase, new_DocumentYou shouldn't use _xapian directly. Use the xapian module instead.> >>>w=new_WritableDatabase("db",DB_CREATE_OR_OPEN) > >>>d=new_Document()You shouldn't call new_WritableDatabase or new_Document directly either. See simpleindex.py for an example of how to use the xapian python bindings correctly. Your example should probably look something like this: import sys sys.path.append("C:/Python25/Lib/site-packages/Xapian") import xapian w=xapian.WritableDatabase("db",xapian.DB_CREATE_OR_OPEN) d=xapian.Document() del d Cheers, Olly