Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • John C Scott 473 posts 1183 karma points
    Nov 08, 2011 @ 09:04
    John C Scott
    0

    The given key was not present in the dictionary

    On an import which is updating 64 records which already exist, from a CSV file I get the output

    Import Finished



    Import is finished 
    Import duration (h:m:s)
    00:00:01
    Records retrieved
    64
    Records imported
    0
    Errors
    64
    -
    The following errors occured

    The given key was not present in the dictionary. 

    this error is then repeated 64 times.

    Any idea what would cause this?

     

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Nov 08, 2011 @ 10:02
    Richard Soeteman
    0

    Hi John,

    Mostly this is related to a certain datatype you are using. The real exception is logged in the UmbracoLog table. Please let me know if the error was related to something I must fix.

    Thanks,

    Richard

  • John C Scott 473 posts 1183 karma points
    Nov 08, 2011 @ 19:32
    John C Scott
    0

    the umbracoLog is not too helpful

    all it says is 

    CMSImport: A record failed to import error:System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.     at System.Collections.Generic.Dictionary`2.get_Item(TKey key)     at CMSImportLibrary.Import.ContentImporter.(ImportState , User , ImportStatistics , String , Int32 )

    &

    CMSImport: Could not delete the failed document :System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.     at
    System.Collections.Generic.Dictionary`2.get_Item(TKey key)     at CMSImportLibrary.Import.ContentImporter.(ImportState , User , ImportStatistics , String , Int32 )

     

    for each record that failed (ie 2 x 64 rows)

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Nov 09, 2011 @ 08:04
    Richard Soeteman
    0

    Ah John I think I know what happened check your recycle bin I think you find a lot of documents over there, otherwise what did you do with the document type between the first import and now?

    Cheers,

    Richard

  • John C Scott 473 posts 1183 karma points
    Nov 09, 2011 @ 09:33
    John C Scott
    0

    I must admit I don't realy understand the way relations work in Umbraco. Is this using that?

    Could it be that I renamed the document type in between the imports?

     

  • John C Scott 473 posts 1183 karma points
    Nov 09, 2011 @ 09:34
    John C Scott
    0

    sorry I mean could it be *because* I renamed the document type in between the imports?

    ie this *is* what I did not what I might have done :)

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Nov 09, 2011 @ 09:53
    Richard Soeteman
    0

    Hmm that could be an issue however it still worked  on my machine. Maybe you use a property that needs to know the document type you are on. I assume you saved the options? If so, open it  and you get an a warning that the document type is changed and you need to specify it again. Do that, save again and start the import. If not please let me know the property types you are using.

    Cheers,

    Richard

Please Sign in or register to post replies

Write your reply to:

Draft