Tnx alot for the quick response Anssi! Your were absolutely right, I downloaded the django tarball and installed from scratch again and it works. Funny how the disk failure corrupted both the django module under site-packages and the raw unpacked tarball from home dir....
/andreas 20 feb 2012 kl. 09:53 skrev akaariai: > On Feb 20, 10:39 am, Andreas <andr...@diabol.se> wrote: >> Hi, >> >> I'm trying to get graphite hooked up with apache and it has a wsgi >> script that uses django. I did a std installation according to the >> graphite wiki and it worked fine, but then we experienced a disk >> failure and after recovery the graphite.wsgi does not work anymore, it >> fails on this line: >> >> import django.core.handlers.wsgi >> >> With this error: >> >> mod_wsgi (pid=25614): Target WSGI script '/opt/spirit/graphite/conf/ >> graphite.wsgi' cannot be loaded as Python module. >> [Mon Feb 06 15:32:25 2012] [error] [client 127.0.0.1] mod_wsgi >> (pid=25614): Exception occurred processing WSGI script '/opt/spirit/ >> graphite/conf/graphite.wsgi'. >> [Mon Feb 06 15:32:25 2012] [error] [client 127.0.0.1] Traceback (most >> recent call last): >> [Mon Feb 06 15:32:25 2012] [error] [client 127.0.0.1] File "/opt/ >> spirit/graphite/conf/graphite.wsgi", line 5, in ? >> [Mon Feb 06 15:32:25 2012] [error] [client 127.0.0.1] import >> django.core.handlers.wsgi >> [Mon Feb 06 15:32:25 2012] [error] [client 127.0.0.1] ImportError: No >> module named core.handlers.wsgi >> >> After recovery I also moved the entire graphite installation but I >> have triple checked to change all path references... >> >> I have googled and read all the posts concerning similar problem and >> checked file permissions to django module, python version on >> mod_wsgi.so and all that but I still can't figure out why this is >> broken. >> >> When I try a simple python cli test loading django.core I get the >> same: >> >> root@usbeta13 graphite]# python >> Python 2.4.3 (#1, Nov 3 2010, 12:52:40) >> [GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2 >> Type "help", "copyright", "credits" or "license" for more information.>>> >> import django >>>>> print django.__file__ >> >> /usr/lib/python2.4/site-packages/django/__init__.pyc>>> import django.core >> >> Traceback (most recent call last): >> File "<stdin>", line 1, in ? >> ImportError: No module named core >> >> >> >> All help appreciated! >> >> Tnx >> >> /Andreas > > You might have a corrupted Django installation. I would suggest > getting rid of the whole site-packages/django directory and > reinstalling. Of course with proper backups etc. I am not that good at > Python deployment issues, so this is just a guess. > > - Anssi > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.