Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #5020
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!aioe.org!feeder.news-service.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <jamfwright@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.014 |
| X-Spam-Evidence | '*H*': 0.97; '*S*': 0.00; '%s"': 0.09; 'subject:Problem': 0.09; 'valueerror:': 0.09; '~ethan~': 0.09; 'pm,': 0.11; '>>>': 0.12; 'wrote:': 0.14; 'furman': 0.16; 'subject:split': 0.16; 'unpack': 0.16; 'traceback': 0.16; '(most': 0.16; 'thanks,': 0.17; 'appear': 0.19; 'cc:no real name:2**0': 0.20; 'cc:2**0': 0.20; 'header:In-Reply-To:1': 0.22; 'cc:addr :python-list': 0.22; 'help,': 0.22; 'mon,': 0.22; '(and': 0.22; 'last):': 0.23; 'message-id:@mail.gmail.com': 0.28; 'changing': 0.29; 'string': 0.29; 'subject:?': 0.29; 'probably': 0.30; 'cc:addr:python.org': 0.31; 'key.': 0.31; 'does': 0.31; 'skip:e 20': 0.33; 'created': 0.33; 'skip:" 10': 0.34; 'change': 0.34; 'file': 0.35; 'that,': 0.35; 'print': 0.35; 'test.': 0.35; 'wright': 0.35; 'getting': 0.36; 'subject:with': 0.37; 'run': 0.37; 'received:google.com': 0.38; 'where': 0.39; 'how': 0.39; 'empty': 0.40; "it's": 0.40; 'header:Received:5': 0.40; 'note:': 0.61; '2011': 0.62; 'show': 0.67; '26,': 0.68; 'received:74.125.83': 0.69; 'ethan,': 0.84; 'subject:Package': 0.84; 'from.': 0.93 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=EWmsV1UKgQOUxKL7BZS7PlQN3t4PfzGXsPydAli5EtA=; b=N+pE94XhZSnXE2/FG45XIKPNAgO2yTmo1P7pGKuFEZ22Sr5gHDsefB4uLdGTmWskzI 3aHb3oAWYyNry8I8KYgr7TuTa34js4K1AUtezQdX4KXHxSP0eTe1SKD9e4v3OIxi46zy tHS6v5zZN0m5BmYxgfnuD2ewvdOut637H53bs= |
| DomainKey-Signature | a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=tkw7JH00j8MMvsWA0D71V4dUb7y2+U6Cveis3nPB5DwnpC9v2/LmXZwrS2fbUm9APk fnZP5NbN1D2eBEcEYGyRRxYr35A9VM4o8T0m/Ml2lElXEduN/c3fYtH6BxOKtppnvqQl CBE0u7v0DLH+2FUzqiPYuLKc5mOEhiaMjFRFE= |
| MIME-Version | 1.0 |
| In-Reply-To | <4DC848B7.6010804@stoneleaf.us> |
| References | <BANLkTi=g2h_BxZDdTdLqyB3nZCukD+Dupw@mail.gmail.com> <4DC838CD.7030404@stoneleaf.us> <BANLkTimuEQMsjyPyW2XUzpQeU8chNPeyGg@mail.gmail.com> <4DC84223.3000502@stoneleaf.us> <BANLkTinCBHbQoJ89OGawt9r02VQvCTeSqw@mail.gmail.com> <4DC848B7.6010804@stoneleaf.us> |
| Date | Mon, 9 May 2011 16:08:20 -0400 |
| Subject | Re: Inconsistency with split() - Script, OS, or Package Problem? |
| From | James Wright <jamfwright@gmail.com> |
| To | Ethan Furman <ethan@stoneleaf.us> |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | quoted-printable |
| Cc | python-list@python.org |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://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 | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1351.1304971704.9059.python-list@python.org> (permalink) |
| Lines | 48 |
| NNTP-Posting-Host | 82.94.164.166 |
| X-Trace | 1304971704 news.xs4all.nl 32470 [::ffff:82.94.164.166]:59086 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:5020 |
Show key headers only | View raw
Hello Ethan,
On Mon, May 9, 2011 at 4:04 PM, Ethan Furman <ethan@stoneleaf.us> wrote:
> James Wright wrote:
>>
>> On Mon, May 9, 2011 at 3:36 PM, Ethan Furman <ethan@stoneleaf.us> wrote:
>>>
>>> Change your print line to:
>>>
>>> print("D4[%s] = %s" % (report, each_value))
>>>
>>> After that, you'll have to track down how D4 is being created to see
>>> where
>>> 'vsr' is coming from.
>>
>> It does not appear to show a key:
>>
>> D4[] = vsr
>
> Huh -- probably the empty string ('') -- to verify that (and know for sure
> -- always good when debugging! ;) change the both %s to %r and run again;
> then you'll have to track down where D4 is being created to see why it's
> getting that weird key.
>
> ~Ethan~
>
A quick note: Renaming the file allowed it to run successfully one
time. Then it failed per usual. Renaming it again did not help, so
that is not a repeatable test.
Changing %s to %r:
D4[''] = vsr
Traceback (most recent call last):
File "render5.py", line 115, in <module>
create_report_index(each_item)
File "render5.py", line 26, in create_report_index
[clean_name, _] = each_value.split('_', 1)
ValueError: need more than 1 value to unpack
Thanks,
James
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Inconsistency with split() - Script, OS, or Package Problem? James Wright <jamfwright@gmail.com> - 2011-05-09 16:08 -0400
csiph-web