KeyError 'source' when uploading a .csv
AlessandroSpallina opened this issue · comments
Describe the bug
When uploading a CSV file I see the following logs:
cheshire_cat_core | [2024-01-23 09:24:08.862] ERROR cat.mad_hatter.mad_hatter.MadHatter.execute_hook::263 => 'Error in plugin ccat_dietician::before_rabbithole_splits_text'
cheshire_cat_core | [2024-01-23 09:24:08.869] ERROR cat.mad_hatter.mad_hatter.MadHatter.execute_hook::264 => KeyError('source')
cheshire_cat_core | [2024-01-23 09:24:08.877] WARNING cat.mad_hatter.mad_hatter.MadHatter.execute_hook::266 => ('To resolve any problem related to Dietician plugin, contact the creator '
cheshire_cat_core | [2024-01-23 09:24:08.877] WARNING cat.mad_hatter.mad_hatter.MadHatter.execute_hook::266 => 'using github issue at the link '
cheshire_cat_core | [2024-01-23 09:24:08.877] WARNING cat.mad_hatter.mad_hatter.MadHatter.execute_hook::266 => 'https://github.com/AlessandroSpallina/ccat-dietician')
cheshire_cat_core | Traceback (most recent call last):
cheshire_cat_core | File "/app/cat/mad_hatter/mad_hatter.py", line 254, in execute_hook
cheshire_cat_core | tea_spoon = hook.function(
cheshire_cat_core | File "/app/cat/plugins/ccat_dietician/dietician.py", line 66, in before_rabbithole_splits_text
cheshire_cat_core | 'name': doc[0].metadata['source'],
cheshire_cat_core | KeyError: 'source'
Activated Plugins
- Ingest Anything
- Dietician