This is a bit strange issue (at least for me)project/
apache/ django.wsgi
project/ __init__.py, settings.py, urls.py ..
pages/
__init__.py
widgets.py
website_views.py
services/
__init__.py
apis/
__init__.py
fparser.py
googleData.py
wp.py
...
wservice.py
...So, the
wservice.pyis wrap-up like class which lies over all classes ofapismodule. It even provides some common functionality to all classes that it inherit.
wservice.pyimport feedparser
from bs4 import BeautifulSoup
class WidgetService(FParser):
def post_content_summary(self, post_number):
content_soup = BeautifulSoup( self.content() ) # self.content comes from FParser.
content_text = content_soup.get_text()
...
def get_random_image(self, post_number):
...
content_soup = BeautifulSoup(html_content)
...
FParserclass is located atfparser.pyThe methods in
fparser.pyuse 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 usingBeautifulSoup, 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)
I really don't understand why this is happening!!..
I tried to debug the WidgetService() class and found that the statement content_soup = BeautifulSoup( self.content() ) is not running.