Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder2.hal-mli.net!weretis.net!feeder1.news.weretis.net!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.011 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'referencing': 0.09; 'value:': 0.09; 'argument': 0.15; 'cc:addr:python-list': 0.15; 'nick': 0.16; 'string",': 0.16; 'wrote:': 0.16; 'meant': 0.17; '>>>': 0.18; 'reason,': 0.18; 'string,': 0.18; '(most': 0.21; 'to:2**1': 0.21; 'cc:no real name:2**0': 0.21; 'header:In-Reply- To:1': 0.22; 'figure': 0.23; 'string': 0.24; 'traceback': 0.24; 'code': 0.25; 'guess': 0.25; "skip:' 10": 0.29; 'problem': 0.29; 'cc:addr:python.org': 0.29; 'none,': 0.30; 'typeerror:': 0.30; 'error': 0.30; 'correct': 0.31; 'list': 0.32; 'it.': 0.33; 'last):': 0.34; 'question': 0.35; 'file': 0.35; 'cc:2**1': 0.36; 'none': 0.36; 'sequence': 0.36; 'but': 0.37; 'received:org': 0.37; 'some': 0.38; 'should': 0.38; 'finding': 0.39; "i'd": 0.39; 'expected': 0.39; 'subject:: ': 0.39; 'reply-to:no real name:2**0': 0.72; 'header:Reply-to:1': 0.84 X-Quarantine-ID: X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "Cc" To: "Clark\, Kathleen" From: Nick Dokos Subject: Re: TypeError In-Reply-To: Message from "Clark\, Kathleen" of "Wed\, 01 Feb 2012 16\:53\:41 GMT." <0610E9FC98B37742AD184612801101F834B04E@x10-mbx4.yu.yale.edu> References: <0610E9FC98B37742AD184612801101F834B04E@x10-mbx4.yu.yale.edu> Organization: HPCS X-Mailer: MH-E 8.3.1; nmh 1.3; GNU Emacs 24.0.92 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Wed, 01 Feb 2012 12:27:47 -0500 Sender: nicholas.dokos@hp.com Cc: "python-list@python.org" X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: nicholas.dokos@hp.com List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 31 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1328117762 news.xs4all.nl 6842 [2001:888:2000:d::a6]:42286 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:19725 Clark, Kathleen wrote: > TypeError: sequence item 1: expected string, NoneType found >=20 > The error message is referencing line 86 of my code: >=20 > ws.cell(row=3Drow, column=3D1).value =3D ','.join([str(ino), fn, ln, sdob= ]) >=20 > If I=E2=80=99m understanding this correctly, the code is expecting a stri= ng, but not finding it. I=E2=80=99m > wondering, what is meant by a =E2=80=9Cstring=E2=80=9D and also how I can= figure out the problem and correct it.=20 I'd guess that the sequence in question is the list that's the argument of join(), in which case item 1 is fn: it should be a string but for some reason, it is a None value: ,---- | >>> ','.join([str(45), None, "bar", "foo"]) | Traceback (most recent call last): | File "", line 1, in | TypeError: sequence item 1: expected string, NoneType found |>>> ','.join([str(45), "a string", "bar", "foo"]) |'45,a string,bar,foo' `---- Nick