KingdomFirst / Excavator

We have now released Bulldozer on GitHub. Bulldozer is the super-powerful big brother to Excavator. Because Bulldozer is now published on GitHub we will no longer be supporting Excavator. Thank you for all the support here!
https://github.com/KingdomFirst/Bulldozer
19 stars 20 forks source link

1.3 Family Address Error #120

Closed arranf closed 9 years ago

arranf commented 9 years ago
"System.ArgumentException: An item with the same key has already been added.
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at SafeDirectoryCatalog..ctor(String directory, Type baseType)
   at Rock.Extension.Container`2.Refresh()
   at Rock.Address.VerificationContainer.<.cctor>b__0()
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.LazyInitValue()
   at Rock.Model.LocationService.Verify(Location location, Boolean reVerify)
   at Rock.Model.LocationService.Get(String street1, String street2, String city, String state, String postalCode, String country)
   at Excavator.CSV.CSVComponent.LoadFamily(CsvDataModel csvData)
   at Excavator.CSV.CSVComponent.TransformData(String importUser)
   at Excavator.ProgressPage.bwImportData_DoWork(Object sender, DoWorkEventArgs e)"
arranf commented 9 years ago

I've spent a while looking at this, I've not figured out why this exception is being thrown still. I figured I'd contribute what I've eliminated so far anyway.

This is definitely a reproducible error with Excavator on MK 3.0 rather than an error with my .csv. It works perfectly using the develop branch on MK 2.0. When you upgrade to 3.0 and then use the develop branch (plus 3.0 mapping and dlls) then the error creeps in even if you just use two lines of import on a fresh install and DB.

I've tried copying the rock.dll again just to check it wasn't that. It's not the additional mappings as the altered mappings had nothing to do with the family.csv. The only thing it could otherwise be on the Excavator side of things is potentially an error with the rockwpf.dll EDIT: I've replaced the rockwpf.dll as well to test that. No dice.

There's been one change to the location service in 1.3 on line 48 which checks to see if the location is null.

dcs619 commented 9 years ago

@arranf I can confirm this is a bug in 1.3.2. However, the problem is with the way MEF components are being loaded, not with the actual address lookup. You should be able to fix the problem by removing the import component you're NOT using (in this case, Excavator.F1.dll).

I've filed an issue with the core team to get this fixed.