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


Groups > comp.lang.python > #5015

Re: Inconsistency with split() - Script, OS, or Package Problem?

Path csiph.com!x330-a1.tempe.blueboxinc.net!aioe.org!feeder.news-service.com!xlned.com!feeder7.xlned.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.005
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'though.': 0.07; 'python': 0.07; '%s"': 0.09; 'subject:Problem': 0.09; 'valueerror:': 0.09; '~ethan~': 0.09; 'pm,': 0.11; 'wrote:': 0.14; 'furman': 0.16; 'grep': 0.16; 'key?': 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; 'mon,': 0.22; 'last):': 0.23; 'received:209.85.212': 0.25; 'message-id:@mail.gmail.com': 0.28; 'string': 0.29; 'subject:?': 0.29; 'cc:addr:python.org': 0.31; 'does': 0.31; 'thank': 0.32; 'skip:e 20': 0.33; 'created': 0.33; 'using': 0.34; 'skip:" 10': 0.34; 'change': 0.34; 'file': 0.35; 'that,': 0.35; 'print': 0.35; 'suggested': 0.35; 'wright': 0.35; 'data': 0.37; 'should': 0.37; 'received:209.85': 0.37; 'subject:with': 0.37; 'skip:\xa0 30': 0.38; 'received:google.com': 0.38; 'current': 0.38; 'could': 0.39; 'where': 0.39; 'received:209': 0.39; 'how': 0.39; '8bit%:8': 0.39; 'header:Received:5': 0.40; '2011': 0.62; 'show': 0.67; '26,': 0.68; '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=U04glwmQVZPJfixxfCZg9uOEA1dK62rXbT8EhxDE9E4=; b=m9we4zixO9Cm/8kqOKGhHk54L/i2BwnD8jHHlsR6MkRkhzaZUBZF42M3UtjA2pVCmq DJDvkg8AnMqBWelJm28XZrZIfPYHoupgCtt7JLIgVFV8baHlpnVrcEQEmSwWCjPJm8yJ or4Iu0bj7CDQG4hmQxHyWPOG5WcnvyObgIUWA=
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=rTug8B4C0X8LBqp1mdd3AgsP4JZWKpKkhTfrqCyrDE2sJMSScpeErs1CFdHLKZZo34 MuUVfVQtfwTq+J9nk2fJaDNyouzN1mYRd9U+4aOU9dp7imgeXS8cuRUoOogyvROtS41h LFHRdX4YV+Kh719A/Flx33/IxVe2vPQSPnhhY=
MIME-Version 1.0
In-Reply-To <4DC84223.3000502@stoneleaf.us>
References <BANLkTi=g2h_BxZDdTdLqyB3nZCukD+Dupw@mail.gmail.com> <4DC838CD.7030404@stoneleaf.us> <BANLkTimuEQMsjyPyW2XUzpQeU8chNPeyGg@mail.gmail.com> <4DC84223.3000502@stoneleaf.us>
Date Mon, 9 May 2011 15:29:34 -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.1347.1304969377.9059.python-list@python.org> (permalink)
Lines 53
NNTP-Posting-Host 82.94.164.166
X-Trace 1304969377 news.xs4all.nl 41114 [::ffff:82.94.164.166]:33928
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:5015

Show key headers only | View raw


On Mon, May 9, 2011 at 3:36 PM, Ethan Furman <ethan@stoneleaf.us> wrote:
> James Wright wrote:
>>
>> Thank you Ethan,
>>
>> This is what I see now:
>>
>> # python render4.py
>> current each_value is: vsr
>> Traceback (most recent call last):
>>  File "render4.py", line 115, in <module>
>>    create_report_index(each_item)
>>  File "render4.py", line 26, in create_report_index
>>    [clean_name, _] = each_value.split('_', 1)
>> ValueError: need more than 1 value to unpack
>>
>> # grep -i vsr *
>> #
>>
>> Using the informational line you suggested I see that 'vsr' showing as
>> the current each_value.  The string 'vsr' does not exist in my data
>> though.  Where could this be coming from?
>
> So 'vsr' in the value -- what is the key?  (Sorry, should have had you print
> that at the same time...)
>
> 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.
>
> ~Ethan~
>

Hi Ethan,

It does not appear to show a key:

D4[] = vsr
Traceback (most recent call last):
  File "render4.py", line 115, in <module>
    create_report_index(each_item)
  File "render4.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


Thread

Re: Inconsistency with split() - Script, OS, or Package Problem? James Wright <jamfwright@gmail.com> - 2011-05-09 15:29 -0400

csiph-web