HaveF / feedparser

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

TypeError: string indices must be integers #392

Open GoogleCodeExporter opened 9 years ago

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

>>> import feedparser
>>> feedparser.parse('http://www.t-shops.co.uk/poll/hidden/podcasting/rlm.xml')

What is the expected output?

  Feed is parsed correctly.

What do you see instead?

  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "/usr/lib/python2.7/dist-packages/feedparser.py", line 4013, in parse
      saxparser.parse(source)
    File "/usr/lib/python2.7/dist-packages/drv_libxml2.py", line 231, in parse
      _d(reader.Name()))
    File "/usr/lib/python2.7/dist-packages/feedparser.py", line 1870, in endElementNS
      self.unknown_endtag(localname)
    File "/usr/lib/python2.7/dist-packages/feedparser.py", line 717, in unknown_endtag
      method()
    File "/usr/lib/python2.7/dist-packages/feedparser.py", line 1534, in _end_category
      if value and len(tags) and not tags[-1]['term']:
  TypeError: string indices must be integers

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

  >>> feedparser.__version__
  '5.1.2'

  % dpkg -l python-feedparser
  Desired=Unknown/Install/Remove/Purge/Hold
  | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
  |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
  ||/ Name             Version       Architecture  Description
  +++-================-=============-=============-======================================
  ii  python-feedparse 5.1.2-1ubuntu all           Universal Feed Parser for Python

A copy of the feed in question is attached.

Original issue reported on code.google.com by th.perl@gmail.com on 25 Feb 2013 at 2:03

Attachments:

GoogleCodeExporter commented 9 years ago
Related gPodder bug: http://gpodder.org/bug/1777

Original comment by th.perl@gmail.com on 25 Feb 2013 at 2:08

GoogleCodeExporter commented 9 years ago
Thanks for reporting this, Thomas! Would you confirm whether this is still an 
issue in git master?

Original comment by kurtmckee on 10 Jul 2014 at 5:05

GoogleCodeExporter commented 9 years ago
Yes, this is still an issue with revision dc3bd29 from Git (which is current 
master HEAD). Can be reproduced by downloading the "rlm.xml" attachment from 
the first bug and trying to parse it with feedparser from Git.

Original comment by th.perl@gmail.com on 23 Jul 2014 at 8:53