views:

239

answers:

1

I've followed the Djapian tutorial and setup everything "by the book" so that the indexshell commandline supplied by Djapian shows successful queries.

However, when integrating the sample search from the Djapian tutorial I get this nonsense error:

TemplateSyntaxError at /search/

Caught an exception while rendering: (13, 'Permission denied')

It points to this line:

{% if results %}

Changing or omitting the line will yield the next (same) error at whichever line that references a field from "results".

The stacktrace shows this exception:

OSError(13, 'Permission denied')

in:

/usr/local/lib/python2.6/dist-packages/django/template/debug.py in render_node

django-debug-toolbar shows for results:

<djapian.resultset.ResultSet object at 0x7f7142affcd0>

Is this an issue with Djapian? In any case, why would it yield a "Permission denied" error?

+1  A: 

Please figure out what is the exact file path involved in this error. I guess it involves a write operation to some template cache, but you should make sure.

Then you just need to check the UNIX permissions on the file accessed or on the directory for that file in the case of a newly created file.

Another possibility is to run your application via strace (it is a command line tool, see man strace) and try to search for such an error (13) in its output. It'll show you the exact path involved in the problem.

fviktor
I finally gave up on djapian and switched to xapian-haystack, the main reasons being at this point that djapian's documentation is badly maintained (as in: conflicting information that'll never lead to a working installation) and the source-code is riddled with mis-spellings that result in not-working code, despite the 2.0 version number. I hope, of course, that the maintainer of djapian can improve code-quality in the future.So far xapian-haystack works fine, with the same Xapian backend as above, so I do believe that the OSError stems from djapian.
prometheus