Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #68823

Re: help with for loop----python 2.7.2

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder7.xlned.com!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <ian.g.kelly@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.049
X-Spam-Evidence '*H*': 0.90; '*S*': 0.00; 'attribute': 0.07; 'subject:help': 0.08; 'suggest': 0.14; '23,': 0.16; 'soup': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'email addr:gmail.com&gt;': 0.22; 'print': 0.22; 'error': 0.23; 'instead.': 0.24; '&gt;': 0.26; 'header:In-Reply-To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; 'skip:d 20': 0.34; 'problem': 0.35; 'subject:with': 0.35; 'received:google.com': 0.35; 'skip:& 10': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'even': 0.60; 'tag': 0.61; 'first': 0.61; 'mar': 0.68; 'beautiful': 0.68; 'results': 0.69
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=TmLhCTcjOF8TLxn+IP8cL9I9N/sWvHXK/zAIYQJKuSs=; b=M1lfEZGOX0vXtG6+4M4qwVOw8Op9KRW4CDAunlH/b2LGSRAEoQnPjR3u2gIccyjpCN XW1TLMYvK/d27aifl2Vm6jIQ43fBTDdQbrbRp6cA44boDNxVFcRrh/h1emykfiJ5hQzL LxghItGvrlIdn/tCyK0rC1UGq/cADvZ4nLLUYNwokXNl1M3JW/h8k9YEsmMO2eLNfbcg zaR3mOKaPs2vkOWGeRAkgXpYlkzBv+Aa2sbl+uG2ZK/TTkcZypvBI+LfMpidQh+qwOIY O/z7I4FHbRa5XpKCn0/o5++uLl07K7HY9i3wFwv1fG0GpqL1K79LwW2K6RkJ5j+qcAGN 8h3Q==
MIME-Version 1.0
X-Received by 10.68.135.195 with SMTP id pu3mr68609020pbb.70.1395614681769; Sun, 23 Mar 2014 15:44:41 -0700 (PDT)
In-Reply-To <5f8a6cae-4e84-4748-beb1-fd931b187e4e@googlegroups.com>
References <84eb4c69-d43d-4777-8a99-34eed9be73d6@googlegroups.com> <03c8b5d0-363e-4287-80d0-a43b0266f2a3@googlegroups.com> <mailman.8418.1395596955.18130.python-list@python.org> <5f8a6cae-4e84-4748-beb1-fd931b187e4e@googlegroups.com>
Date Sun, 23 Mar 2014 16:44:41 -0600
Subject Re: help with for loop----python 2.7.2
From Ian Kelly <ian.g.kelly@gmail.com>
To Python <python-list@python.org>
Content-Type multipart/alternative; boundary=e89a8ffbad2759acd004f54ddd93
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.8421.1395614684.18130.python-list@python.org> (permalink)
Lines 37
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1395614684 news.xs4all.nl 2856 [2001:888:2000:d::a6]:51900
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:68823

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

On Mar 23, 2014 3:56 PM, "tad na" <teddybubu@gmail.com> wrote:
>
> This is the error I get with
> 1. print data[x].pubDate.text
>     AttributeError: 'NoneType' object has no attribute 'text'
> 2. print data[x].pubDate
>     It results in "None"

So the problem is that it's not even finding the pubDate tag in the first
place. Some sites on the Web suggest that beautiful soup normalizes all
tags to lowercase; try looking for the pubdate tag instead.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

help with for loop----python 2.7.2 teddybubu@gmail.com - 2014-03-22 04:21 -0700
  Re: help with for loop----python 2.7.2 Ian Kelly <ian.g.kelly@gmail.com> - 2014-03-22 06:00 -0600
  Re: help with for loop----python 2.7.2 tad na <teddybubu@gmail.com> - 2014-03-23 10:29 -0700
    Re: help with for loop----python 2.7.2 tad na <teddybubu@gmail.com> - 2014-03-23 10:30 -0700
      Re: help with for loop----python 2.7.2 Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-03-23 17:40 +0000
        Re: help with for loop----python 2.7.2 tad na <teddybubu@gmail.com> - 2014-03-23 10:49 -0700
      Re: help with for loop----python 2.7.2 Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-03-23 18:43 +0000
    Re: help with for loop----python 2.7.2 Ian Kelly <ian.g.kelly@gmail.com> - 2014-03-23 11:49 -0600
      Re: help with for loop----python 2.7.2 tad na <teddybubu@gmail.com> - 2014-03-23 14:51 -0700
        Re: help with for loop----python 2.7.2 Ian Kelly <ian.g.kelly@gmail.com> - 2014-03-23 16:44 -0600
  Re: help with for loop----python 2.7.2 Ben Finney <ben+python@benfinney.id.au> - 2014-03-24 09:39 +1100

csiph-web