jsumners / jsumners/feedparser

TypeError exception when parsing some feed

Open
#345 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-migrated
Dominant language
Python
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

It happens on http://threeminds.organic.com/feed
See below

>>> import feedparser
>>> feedparser.parse('http://threeminds.organic.com/feed')
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "/Library/Python/2.7/site-packages/feedparser.py", line 3997, in parse
    saxparser.parse(source)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 107, in par
se
    xmlreader.IncrementalParser.parse(self, source)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/xmlreader.py", line 123, in parse

    self.feed(buffer)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 207, in fee
d
    self._parser.Parse(data, isFinal)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 349, in end
_element_ns
    self._cont_handler.endElementNS(pair, None)
  File "/Library/Python/2.7/site-packages/feedparser.py", line 1859, in endElementNS
    self.unknown_endtag(localname)
  File "/Library/Python/2.7/site-packages/feedparser.py", line 708, in unknown_endtag
    method()
  File "/Library/Python/2.7/site-packages/feedparser.py", line 1525, in _end_category
    if value and len(tags) and not tags[-1]['term']:
TypeError: string indices must be integers

Original issue reported on code.google.com by analo...@gmail.com on 18 Apr 2012 at 7:20

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with feedparser.parse('http://threeminds.organic.com/feed') and inspect feedparser.py at _end_category, around line 1525, where the traceback points. Determine why tags contains an unexpected value during parsing; done means this feed parses without the reported TypeError, with regression coverage if the repository provides a suitable test location.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.