-
Notifications
You must be signed in to change notification settings - Fork 0
specifying key_field parameter for split_occurrence_data causes exception #341
Comments
@zzeppozz is data available somewhere? and what does the wrangler configuration file look like? |
CLI split_occurrence_data fails on providing key_field in config file. Fails different ways with 1 or 2 fields in the list. It works fine if I leave out that parameter. With 2 fields in the list: } root@c80091bd812f:/# split_occurrence_data --config_file /volumes/data/config/split_occurrence_data.json fails differently with 1 key_field in the list: } During handling of the above exception, another exception occurred: Traceback (most recent call last): |
Describe the bug
Specifying the key_field parameter in a config_file for split_occurrence_data throws exception:
Traceback (most recent call last):
File "/usr/local/bin/split_occurrence_data", line 8, in
sys.exit(cli())
File "/usr/local/lib/python3.8/dist-packages/lmpy/tools/split_occurrence_data.py", line 135, in cli
occurrence_processor.process_reader(reader, wranglers)
File "/usr/local/lib/python3.8/dist-packages/lmpy/data_preparation/occurrence_splitter.py", line 168, in process_reader
self.write_points(points)
File "/usr/local/lib/python3.8/dist-packages/lmpy/data_preparation/occurrence_splitter.py", line 181, in write_points
if writer_key not in self.writers.keys():
TypeError: unhashable type: 'list'
To Reproduce
at a bash prompt, run split_occurrence_data --config_file=
with the config file
{
"max_open_writers": 100,
"key_field": "scientificName",
"dwca": [
["/volumes/data/input/occ_heuchera_gbif.zip",
"/volumes/data/config/wrangle_nothing.json"
]
],
"out_dir": "/volumes/output"
}
Expected behavior
No exception, executes correctly.
Desktop (please complete the following information)
The text was updated successfully, but these errors were encountered: