ValueError from dict - some detail would be helpful

Discussion in 'Python' started by metaperl, Jan 11, 2007.

  1. metaperl

    metaperl Guest

    File "/sw/lib/python2.5/csv.py", line 120, in _dict_to_list
    raise ValueError, "dict contains fields not in fieldnames"


    --- it would be nice if it said what field it was

    I know that I can do a set difference on the two myself, but since it
    know what wasn't there.. why not report it and save me some time?
     
    metaperl, Jan 11, 2007
    #1
    1. Advertising

  2. metaperl wrote:

    > File "/sw/lib/python2.5/csv.py", line 120, in _dict_to_list
    > raise ValueError, "dict contains fields not in fieldnames"
    >
    >
    > --- it would be nice if it said what field it was


    Yeap, nice and useful... but, for example, what'd happen if the fields
    that are not in fieldnames are 10, or 100? How the message could be?

    --
    .. Facundo
    ..
    Blog: http://www.taniquetil.com.ar/plog/
    PyAr: http://www.python.org/ar/
     
    Facundo Batista, Jan 12, 2007
    #2
    1. Advertising

  3. "Facundo Batista" <> escribió en el mensaje
    news:eo8agn$5au$...
    > metaperl wrote:
    >
    >> File "/sw/lib/python2.5/csv.py", line 120, in _dict_to_list
    >> raise ValueError, "dict contains fields not in fieldnames"
    >>
    >>
    >> --- it would be nice if it said what field it was

    >
    > Yeap, nice and useful... but, for example, what'd happen if the fields
    > that are not in fieldnames are 10, or 100? How the message could be?


    The code inside _dict_to_list currently just stops at the first unknown key.
    Just report that - much better than nothing.
    http://sourceforge.net/tracker/index.php?func=detail&aid=1634717&group_id=5470&atid=355470

    --
    Gabriel Genellina
     
    Gabriel Genellina, Jan 13, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Peter D. Dunlap

    Configuration Error Not Helpful

    Peter D. Dunlap, Jul 18, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    363
    Peter D. Dunlap
    Jul 19, 2005
  2. =?Utf-8?B?cm9nZXIyMw==?=

    MSbuild not building. no helpful error messages.

    =?Utf-8?B?cm9nZXIyMw==?=, May 27, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    4,677
    =?Utf-8?B?cm9nZXIyMw==?=
    May 27, 2006
  3. Pettersen, Bjorn S
    Replies:
    1
    Views:
    1,864
    Emile van Sebille
    Nov 11, 2003
  4. Arun Kumar Menon

    Master Detail detail

    Arun Kumar Menon, Aug 6, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    221
    Arun Kumar Menon
    Aug 6, 2003
  5. Frederik Borg

    ASp.net data binding: Master-detail-detail

    Frederik Borg, Jun 9, 2006, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    385
    Frederik Borg
    Jun 9, 2006
Loading...

Share This Page