Jason Tackaberry wrote:
> On Tue, 2006-04-18 at 19:34 -0400, Jason Tackaberry wrote:
>> If I try to monitor a directory with a fresh ~/.beacon here's what I get:
>
> And more, possibly related (or possibly not). I managed to
> index /data/mp3/Singles (I'm not sure why I was able to index that and
> not /data/movies via BEACON_MONITOR -- could it really be the space in
> the filenames under /data/movies? Nahh, more likely the fact
> that /data/movies is comprised of symlinks and /data/mp3/Singles is
> not?)
>
> I also added another directory to BEACON_MONITOR (/home/tack/tv).
>
> But now:
>
> [EMAIL PROTECTED] ~]$ beacon --search keywords=eyes
> Traceback (most recent call last):
> File "/usr/bin/beacon", line 147, in ?
> result = kaa.beacon.query(**query)
> File "/usr/lib/python2.4/site-packages/kaa/beacon/__init__.py", line 77, in
> query
> return _client.query(**args)
> File "/usr/lib/python2.4/site-packages/kaa/beacon/client.py", line 109, in
> query
> result = Query(self, **query)
> File "/usr/lib/python2.4/site-packages/kaa/beacon/query.py", line 61, in
> __init__
> self.result = self._client.database.query(**query)
> File "/usr/lib/python2.4/site-packages/kaa/beacon/db.py", line 404, in query
> parent = self._query_id(pid, cache)
> File "/usr/lib/python2.4/site-packages/kaa/beacon/db.py", line 337, in
> _query_id
> parent = self._query_id(pid)
> File "/usr/lib/python2.4/site-packages/kaa/beacon/db.py", line 329, in
> _query_id
> raise AttributeError('bad media %s' % i['parent'])
> TypeError: not all arguments converted during string formatting
Besides the bug in the error message, why can't beacon find the media?
The media support (different root dirs on different media like cd) is
not integrated yet and you should always find the media (normal hd).
> Note that if I fix that to str(i['parent']) then:
>
> AttributeError: bad media (u'dir', 8)
>
> sqlite> select name,id,parent_id from objects_dir where id=8;
> tv|8|7
> sqlite> select name,id,parent_id from objects_dir where id=7;
> tack|7|6
> sqlite> select name,id,parent_id from objects_dir where id=6;
> home|6|1
> sqlite> select name,id,parent_id from objects_dir where id=1;
> |1|1
>
> The keyword 'eyes' should match 2 files. One in /data/mp3/Singles, and
> one in /home/tack/tv/buffy. So the "bad media" I assume is referring
> to /home/tack/tv. Does it think this is some sort of mount point?
Yes, if the name is empty we are at the root node and search with
on which media the root node is mounted. Since you are in your tv dir,
why is name empty?
| i = self._db.query(type=type, id=id)[0]
| # now we need a parent
| if i['name'] == '':
| # root node found, find correct mountpoint
| for m in self._mountpoints:
| if m.id == i['parent']:
| break
| else:
| raise AttributeError('bad media %s' % str(i['parent']))
| return create_dir(i, m)
The question here is what is the result of the kaa.db query and why
has it no name set?
> I guess there's lots of bugs to work out with beacon.
Not lots of bugs, but small stuff that doesn't match my testing cases
like your softlinks for example.
Dischi
--
The truth is out there? Does anyone know the URL?
pgpEeC6TvNZ8e.pgp
Description: PGP signature
