Take the 2-minute tour ×

This is my django project hierarchy

       apache/ django.wsgi
       project/ __init__.py, settings.py, urls.py ..

So, the wservice.py is wrap-up like class which lies over all classes of apis module. It even provides some common functionality all classes that it inherit.


import feedparser
from bs4 import BeautifulSoup

class WidgetService(FParser):
    def post_content_summary(self, post_number):   
        content_text = content_soup.get_text()


    def get_random_image(self, post_number):
        content_soup = BeautifulSoup(html_content)


FParser class is located at fparser.py

The methods in fparser.py use the above class in this way.

from services.wservice import WidgetService
def method1():
    obj = WidgetService()
    m1 = obj.foo1() # described in FParser class
    m2 = obj.foo2() # described in WidgetService class

I am using this WidgetService() in pages/widgets.py. So, what I found is, when ever I start using BeautifulSoup, the apache server is not loading.. Its not even showing any syntax error.

I don't even see any error in log file.

What might have possibly went wrong??? The interesting part is, I haven't faced this kind of error in development server, heroku (gunicorn)

share|improve this question

1 Answer 1

up vote 1 down vote accepted

This may be the interaction between Cython and mod_wsgi described here, and explored in a Beautiful Soup context here. Here's an earlier question similar to yours.

share|improve this answer
Thanks.. the links straight away solved the bug –  Surya Jul 10 '12 at 13:01

Your Answer


