Skip to content Skip to sidebar Skip to footer

Different Nltk Results In Django And At Command Line

I have a django 1.8 view that looks like this: def sourcedoc_parse(request, sourcedoc_id): sourcedoc = Sourcedoc.objects.get(pk=sourcedoc_id) nltk.data.path.append('/root/n

Solution 1:

The problem here is that the user running django don't have permission to read at /root.

It does not happens when running django shell because you are running the shell as root, but the server is running as the www user (see, the first directory where nltk search is /var/www/nltk_data, the home dir for the www user).

Post a Comment for "Different Nltk Results In Django And At Command Line"