libo26 / feedparser

Automatically exported from code.google.com/p/feedparser
Other
0 stars 0 forks source link

IndexError: pop from empty list #261

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

Python 2.5.5 (r255:77872, Feb  1 2010, 19:53:42) 
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import feedparser
>>> feedparser.__version__
'5.0.1'
>>> feedparser.parse('http://feed.feedsky.com/tugus1k')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "feedparser.py", line 3822, in parse
    feedparser.feed(data.decode('utf-8', 'replace'))
  File "feedparser.py", line 1851, in feed
    sgmllib.SGMLParser.feed(self, data)
  File "/usr/lib/python2.5/sgmllib.py", line 99, in feed
    self.goahead(0)
  File "/usr/lib/python2.5/sgmllib.py", line 138, in goahead
    k = self.parse_endtag(i)
  File "/usr/lib/python2.5/sgmllib.py", line 315, in parse_endtag
    self.finish_endtag(tag)
  File "/usr/lib/python2.5/sgmllib.py", line 355, in finish_endtag
    self.unknown_endtag(tag)
  File "feedparser.py", line 657, in unknown_endtag
    method()
  File "feedparser.py", line 1647, in _end_content
    value = self.popContent('content')
  File "feedparser.py", line 961, in popContent
    value = self.pop(tag)
  File "feedparser.py", line 868, in pop
    mfresults = _parseMicroformats(output, self.baseuri, self.encoding)
  File "feedparser.py", line 2426, in _parseMicroformats
    p.findTags()
  File "feedparser.py", line 2389, in findTags
    tag = segments.pop()
IndexError: pop from empty list
>>> 

What is the expected output? What do you see instead?

I expect to have the feed parsed. I see IndexError instead.

What version of the product are you using? On what operating system?

Latest official stable build and trunk. Linux.

Original issue reported on code.google.com by nikolay....@gmail.com on 7 Mar 2011 at 10:56

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by kurtmckee on 10 Mar 2011 at 6:57

GoogleCodeExporter commented 9 years ago
I'm attaching a simplified document that more clearly demonstrates the issue.

Original comment by kurtmckee on 10 Mar 2011 at 8:21

Attachments:

GoogleCodeExporter commented 9 years ago
Fixed in r385.

Original comment by kurtmckee on 20 Apr 2011 at 8:12