Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crashes when parsing one of blogspot feeds #271

Closed
norayr opened this issue Mar 27, 2021 · 5 comments
Closed

crashes when parsing one of blogspot feeds #271

norayr opened this issue Mar 27, 2021 · 5 comments
Assignees

Comments

@norayr
Copy link

norayr commented Mar 27, 2021

actually all three feeds from https://randomphoto.blogspot.com/ blog crash the parser.

<link rel="alternate" type="application/atom+xml" title="Random Camera Blog - Atom" href="https://randomphoto.blogspot.com/feeds/posts/default" />
<link rel="alternate" type="application/rss+xml" title="Random Camera Blog - RSS" href="https://randomphoto.blogspot.com/feeds/posts/default?alt=rss" />
<link rel="service.post" type="application/atom+xml" title="Random Camera Blog - Atom" href="https://www.blogger.com/feeds/8717981/posts/default" />

so it crashes like this:

Traceback (most recent call last):
  File "/home/norayr/.local/lib/python3.7/site-packages/feedparser.py", line 3766, in _gen_georss_coords
    t = [nxt(), nxt()][::swap and -1 or 1]
StopIteration

as it is seen from the quote, i use python3.7.

...
The above exception was the direct cause of the following exception:
...
  File "/usr/lib/python3.7/site-packages/drv_libxml2.py", line 239, in parse
    _d(reader.Name()))
  File "/home/norayr/.local/lib/python3.7/site-packages/feedparser.py", line 2052, in endElementNS
    self.unknown_endtag(localname)
  File "/home/norayr/.local/lib/python3.7/site-packages/feedparser.py", line 696, in unknown_endtag
    method()
  File "/home/norayr/.local/lib/python3.7/site-packages/feedparser.py", line 1463, in _end_georss_point
    geometry = _parse_georss_point(self.pop('geometry'))
  File "/home/norayr/.local/lib/python3.7/site-packages/feedparser.py", line 3775, in _parse_georss_point
    coords = list(_gen_georss_coords(value, swap, dims))
RuntimeError: generator raised StopIteration

thank you.

@auouymous
Copy link
Contributor

It looks like you might be using feedparser 5, version 6.0.2 works fine.

@kurtmckee kurtmckee self-assigned this Apr 19, 2021
@kurtmckee
Copy link
Owner

@norayr would you confirm which version of feedparser you have installed? @auouymous is correct, there should be a fix for this in feedparser 6.

@norayr
Copy link
Author

norayr commented May 3, 2021

sorry for delay, i'll check today.

@norayr
Copy link
Author

norayr commented May 3, 2021

so thank you, i updated 5.2.1 (if i remember correctly to 6.0.2 and now it works!

thank you so much!

@kurtmckee
Copy link
Owner

Great news, @norayr!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants