We should also mention that a few edits to the code were made before the 
CSV importer worked. I have not submitted these changes in a Pull Request 
yet, as I am still 100% certain that those changes are unrelated to the 
problem described by Nathan. For reference, here is the diff to the code:

diff --git a/arches/app/utils/data_management/resources/formats/csvfile.py 
b/arches/app/utils/data_management/resources/formats/csvfile.py
index dbecd9a..7a11e08 100644
--- a/arches/app/utils/data_management/resources/formats/csvfile.py
+++ b/arches/app/utils/data_management/resources/formats/csvfile.py
@@ -396,18 +396,18 @@ class CsvReader(Reader):
                     # return deepcopy(blank_tile)
                     return cPickle.loads(cPickle.dumps(blank_tile, -1))
 
-                def check_required_nodes(tile, required_nodes, all_nodes):
+                def check_required_nodes(target_tile, required_nodes, 
all_nodes):
                     # Check that each required node in a tile is populated.
                     errors = []
                     if len(required_nodes) > 0:
-                        if target_tile.data != {}:
-                            for target_k, target_v in 
target_tile.data.iteritems():
+                        if getattr(target_tile, 'data', None) != {}:
+                            for target_k, target_v in getattr(target_tile, 
'data', {}).iteritems():
                                 if target_k in required_nodes.keys() and 
target_v is None:
                                    
 populated_tiles.pop(populated_tiles.index(target_tile))
                                     errors.append({'type': 'WARNING', 
'message': 'The {0} node is required and must be populated in order to 
populate the {1} nodes. This data was not i
                         elif target_tile.tiles != None:
-                            for tile in tiles:
-                                check_required_nodes(tile)
+                            for tile in target_tile.tiles:
+                                check_required_nodes(tile, required_nodes, 
all_nodes)
                     if len(errors) > 0:
                         self.errors += errors




On Wednesday, January 10, 2018 at 11:26:04 AM UTC-8, Nathan Lomeli wrote:
>
> Here's a Dropbox link to the files mentioned below:
>
> https://www.dropbox.com/sh/1wx9x4kdk5b7a33/AACqzIROyoT2R-03lAgXE-qta?dl=0
>
>
>
> We are performing a CSV resources import (for our "Person" model) using 
> the included mapping file.  Everything seems to be importing properly 
> except for this pair of columns:
>
> *name_part_type name_part_value*
>
> In accordance with the CSV import formatting described in the Arches 
> documention (link below), each new concept type and value appears on a new 
> row.
>
>
> http://arches4.readthedocs.io/en/latest/import-export/#concept-values-in-csvs-and-the-concepts-file
>
> The import process seems to run successfully, but when we inspect the 
> imported data, only the first concept-value pair has been loaded, not those 
> on subsequent CSV rows for a given resource.
>
> We are not sure if this failure to load a list of concept-values is 
> problem with the graph, our card settings, our import process, or the 
> formatting of our CSV or mapping files.
>
> Our Arches graph data is included in order for the problem to be 
> reproduced (again, see link to Dropbox above).
>
>

-- 
-- To post, send email to [email protected]. To unsubscribe, send 
email to [email protected]. For more information, 
visit https://groups.google.com/d/forum/archesproject?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Arches Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to