[Xapian-discuss] xapian.DocNotFoundError: regression?
Jason Tackaberry
tack at urandom.ca
Fri Feb 19 20:12:04 GMT 2010
On Fri, 2010-02-19 at 00:45 +0000, Olly Betts wrote:
> I wondering if it is picking up the wrong xapian library, which could
> cause odd problems.
Well, the db directory contains 'iamchert' and I have no other instance
of 1.1.x installed on this system.
> What does this report (_xapian.so is the compiled bit of
> the Python module, you may need to adjust the directory path):
> ldd /usr/lib/python2.5/site-packages/xapian/_xapian.so
I do have xapian installed in a non-standard path. My scheme is such
that anything I build manually goes in /opt/<appname>/<version> and I've
a symlink /opt/<appname>/current -> /opt/<appname>/<version>. I have a
login script that goes through /opt/*/current and sets up $PATH,
$LD_LIBRARY_PATH, $PYTHONPATH, etc.
This is typically not a problem for other modules.
tack at orion:~$ ldd /opt/xapian/current/lib/python2.5/site-packages/xapian/_xapian.so
linux-gate.so.1 => (0xb7eef000)
libxapian-1.1.so.4 => /opt/xapian/1.1.4/lib/libxapian-1.1.so.4 (0xb7c01000)
libz.so.1 => /usr/lib/libz.so.1 (0xb7bd7000)
libuuid.so.1 => /lib/libuuid.so.1 (0xb7bd3000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7ae0000)
libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7abb000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb796c000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7960000)
/lib/ld-linux.so.2 (0xb7ef0000)
I hacked xapian.py to print _xapian.__file__ just to be sure (see
below). There is no package managed installation of xapian (i.e. nothing
in /usr/). 1.0.16 was built the same way as 1.1.4.
tack at orion:~$ ls -l /opt/xapian/
total 8
drwxr-xr-x 6 root root 4096 2009-09-27 23:03 1.0.16
drwxr-xr-x 6 root root 4096 2010-02-19 11:27 1.1.4
lrwxrwxrwx 1 root root 6 2010-02-19 14:34 current -> 1.1.4/
tack at orion:~$ echo $PYTHONPATH
/opt/xapian/current/lib/python2.5/site-packages
tack at orion:~$ sudo ln -sfn /opt/xapian/1.0.16 /opt/xapian/current
tack at orion:~$ rm -rf xapdb/; python xaptest.py
10 results.
tack at orion:~$ ls -l xapdb/iam*
-rw-r--r-- 1 tack tack 12 2010-02-19 14:56 xapdb/iamflint
tack at orion:~$ sudo ln -sfn /opt/xapian/1.1.4 /opt/xapian/current
tack at orion:~$ rm -rf xapdb/; python xaptest.py
_xapian is: /opt/xapian/current/lib/python2.5/site-packages/xapian/_xapian.so
Traceback (most recent call last):
File "xaptest.py", line 22, in <module>
print '%d results.' % len(enquire.get_mset(0, 10))
xapian.DocNotFoundError: Document 2 not found
tack at orion:~$ ls -l xapdb/iam*
-rw-r--r-- 1 tack tack 28 2010-02-19 14:56 xapdb/iamchert
Everything seems to be in order here, so this might be a red herring.
Just to be sure, I removed /opt/xapian/current and reinstalled
xapian-core and xapian-bindings with no special prefix (so
into /usr/local) and the same problem occurs.
> Assuming that your platform has ldd that is - what platform is this?
Linux (Ubuntu 8.04).
Thanks,
Jason.
More information about the Xapian-discuss
mailing list