pombreda / feedparser

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

crash with invalid time #275

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Parse attached xml file.

What is the expected output? What do you see instead?
Something else than a crash.

What version of the product are you using? On what operating system?
Version 5.0.1. Python 2.5.4 on Windows XP.

Please provide any additional information below.
Problem is the invalid time of item:
<pubDate>Wed, 31 Dec 1969 00:00:00</pubDate>

Original issue reported on code.google.com by floridan...@gmail.com on 29 Apr 2011 at 3:04

Attachments:

GoogleCodeExporter commented 9 years ago
I'm not able to reproduce this using Python 2.5.5 on Linux. Would you try 
downloading the latest source code from subversion (direct link below) and see 
if you can still reproduce this? Additionally, I'd really appreciate it if you 
copied the traceback to a text file and uploaded the result as well so I can 
see the error that's being raised. Thanks!

https://feedparser.googlecode.com/svn/trunk/feedparser/feedparser.py

Original comment by kurtmckee on 29 Apr 2011 at 7:17

GoogleCodeExporter commented 9 years ago
Sorry about the delay. I tried the latest source code without success. 
Traceback is as an attachment.

Original comment by floridan...@gmail.com on 2 May 2011 at 6:01

Attachments:

GoogleCodeExporter commented 9 years ago
The Python documentation seems to suggest that this isn't reproducible for me 
because Python relies on the system C library to do the date/time conversions, 
which is where I'm guessing the difference lies.

Nevertheless, it pointed out that `_parse_date()` wasn't catching OverflowError 
exceptions. I've fixed that and added a test case in a github branch. Would you 
please download the source code and try once more on your system?

Branch:
https://github.com/kurtmckee/feedparser/tree/issue275

Direct download:
https://github.com/kurtmckee/feedparser/raw/f84e493a93c9f00a6a4c1fa4276e1000f751
e671/feedparser/feedparser.py

Original comment by kurtmckee on 2 May 2011 at 6:50

GoogleCodeExporter commented 9 years ago
Fixed version works perfectly. Thank you.

Original comment by floridan...@gmail.com on 2 May 2011 at 6:56

GoogleCodeExporter commented 9 years ago
No problem! Thanks for helping me track this down.

Fixed in r550.

Original comment by kurtmckee on 2 May 2011 at 6:59