-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Running against a single file containing a <mods> root element:
$ python3 run.py -f /PATH/MODS.xml -x test.csv -xf csv -r mods
Traceback (most recent call last):
File "run.py", line 87, in <module>
current_record.ordered_split()
File "/Users/rlefaive/Git/complex_xml_to_openrefine/record.py", line 47, in ordered_split
for k, v in self.record.items():
AttributeError: 'str' object has no attribute 'items'
If this happens in all instances (and isn't unique to python3, or my MODS that doesn't include <?xml version="1.0" encoding="UTF-8"?> at the head, or...
then the fix could be
--- a/run.py
+++ b/run.py
@@ -75,7 +75,7 @@ if __name__ == "__main__":
real_json_call = real_json
for x in full_path:
real_json_call = real_json_call[x]
- our_list_of_records = real_json_call
+ our_list_of_records = [real_json_call]
else:
my_source = path_to_files
records = Batch(path_to_files)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels