[GRASS-dev] GRASS 7 scripts overhaul

Michael Barton Michael.Barton at asu.edu
Tue Sep 13 12:21:55 EDT 2011


You're right of course. Somehow I read the ValueError wrong. A dyslexic or senior moment I suppose.

Michael
____________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity 
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University

voice: 	480-965-6262 (SHESC), 480-727-9746 (CSDC)
fax:          480-965-7671 (SHESC),  480-727-0709 (CSDC)
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu











On Sep 13, 2011, at 3:16 AM, Glynn Clements wrote:

> 
> Michael Barton wrote:
> 
>>> line 267, in main
>>>   x, y = xy.split('\t')
>>> ValueError: need more than 1 value to unpack
>> 
>> I don't know this script, but this error means that the string xy
>> has more than 2 items that are separated by a tab (or by a space in
>> the earlier post).
> 
> Wrong. In that case, the error would be "too many values to unpack".
> 
> In this case, the error is that there are too few values: splitting
> the string results in a single value (i.e. there are *zero* tabs),
> when two values are expected.
> 
> I can't actually reproduce this error.
> 
> The problems which I had with cs2cs were related to the case where the
> -E flag was used (when copy_input is True). In that situation, cs2cs
> copies some prefix of the input to the beginning of the output,
> complete with whatever whitespace it contained, and also copied some
> portion of the input to the end of the output, again with whitespace
> intact.
> 
> This means that the two fields we're actually interested in are
> bracketed by arbitrary text containing (apparently) arbitrary
> whitespace, which makes identifying those fields impossible.
> 
> -- 
> Glynn Clements <glynn at gclements.plus.com>



More information about the grass-dev mailing list