> all tests pass, but when try to use it inside Django, it silently > crushes. Crush happens on import sentance already... for example at: > from PyLucene import FSDirectory > ... no error message, just crush > > anyone had this problem before ?
Not sure about that specific problem, but as far as I know, PyLucene will not work from inside Django. The issue is Django uses python threads and PyLucene uses PyLucene threads (a small wrapper on top of normal python threads). Even though they are just a small wrapper, they are incompatible with each other. The only solution would be to grep all the 'import Thread' in Django source code and substitute with 'import PythonThread as Thread' (don't recall offhand if that's the exact name). If you google, this issue has been raised before - not specific to Django, but usually related to some web framework which was making extensive use of threads (eg. CherryPy in this http://lists.osafoundation.org/pipermail/pylucene-dev/2006-June/001107.html). I'm a bit short on time to find more relevant threads, but searching pylucene-dev should explain the issue clearer. The only solution I came up with temporarily is to run PyLucene as a seperate server and have Django communicate with it remotely. If you discover a way to run PyLucene inside Django, I would love to hear about it. Cheers, Norbert _______________________________________________ pylucene-dev mailing list [email protected] http://lists.osafoundation.org/mailman/listinfo/pylucene-dev
