On 10/10/07, Emre Sevinc <[EMAIL PROTECTED]> wrote:
[snip]

$ python generatefeedvector-debug.py
> Signal vs. Noise
> Traceback (most recent call last):
>   File "generatefeedvector-debug.py", line 37, in ?
>     title = getwordcounts(feedurl)
>   File "generatefeedvector-debug.py ", line 21, in getwordcounts
>     print d.feed.title
>   File "/var/lib/python-support/python2.4/feedparser.py", line 236, in
> __getattr__
>     raise AttributeError, "object has no attribute '%s'" % key
> AttributeError: object has no attribute 'title'
>
>
> The strange thing is that it DOES print the value d.feed.title then
> complains AttributeError: object has no attribute 'title'. What am I
> doing wrong?
>
> The file feedlist1-2.txt includes just a single line:
>
> $ cat feedlist1-2.txt
> http://feeds.feedburner.com/37signals/beMH


I'll bet your feedlist1-2.txt file has a blank line at the end.  Your
program is printing the title for the first line and then choking when you
try to retrieve the title for the blank line.

Karen
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to