Universal Feed Browser problem in feedparser.py

Virgil Stokes vs at it.uu.se
Mon Feb 7 13:47:55 EST 2011


I am running Python 2.6 on a Windows Vista (32-bit) platform. I recently 
installed the Universal Feed Parser package (feedparser-5-0). When I try to 
execute the following commands:

 >>> import feedparser
 >>> d = feedparser.parse("http://feedparser.org/docs/examples/atom10.xml")

which is given at http://www.feedparser.org/

I get an Assertion error in the following function in feedparser.py


def __getattr__(self, key):
         try:
               return self.__dict__[key]
         except KeyError:
               pass
         try:
               assert not key.startswith('_') <-------  Error occurs when this 
statement is executed.
               return self.__getitem__(key)
         except:
               raise AttributeError, "object has no attribute '%s'" % key


Why does the error occur and how should he be corrected?




More information about the Python-list mailing list