On 2010/09/18 5:48 PM, Freek Dijkstra wrote:
This was not very helpful (in fact I was confused because the last entry clearly shows there is a module iweb!). After setting the $PYTHONPATH to include /opt/calendarserver/usr/lib/python2.5/site-packages/twext/web2 (besides the already included /opt/calendarserver/usr/lib/python2.5/site-packages) another version was (apparently) used, and the help message was better:
File "/opt/calendarserver/usr/lib/python2.5/site-packages/twext/web2/iweb.py", line 152, in from twisted.web.iweb import IRequest as IOldRequest ImportError: No module named iweb
Aha. It was not looking for twext.web2.iweb, but for twisted.web.iweb. locate shows that I have 3 locations of twisted:
/opt/calendarserver/usr/lib/python2.5/site-packages/twisted /usr/lib/python2.5/site-packages/twisted /usr/local/lib/python2.5/site-packages/twisted
What happens if you edit PYTHONPATH in /opt/CalendarServer/usr/bin/caldavd to the following: DESTDIR=/opt/calendarserver PYTHONPATH="$DESTDIR/usr/lib/python2.6/site-packages/:/usr/lib/python2.6/site-packages/:$PYTHONPATH" By putting the /opt path first it should search there first as well.
Unfortunately, twisted.web.iweb is in the third path, while python is looking in the first path (since it found a twisted subfolder there).
I had hoped to keep the installation calenderserver out of /usr, but it now seems I either have to copy (of symlink) files back and forth, or merge the site-package folders. I have a copy working in /opt without any symlinks or hacks (apart from what I mentioned in my last email) so it should be possible!
Regards, Stewart