grimoirelab-elk icon indicating copy to clipboard operation
grimoirelab-elk copied to clipboard

[Gitter] Enrichment Index Error

Open k----n opened this issue 3 years ago • 0 comments

Here is the error:

2022-01-30 04:53:17,513 - grimoire_elk.elk - ERROR - Error enriching raw from gitter (https://gitter.im/scala/scala): list index out of range
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/grimoire_elk/elk.py", line 562, in enrich_backend
    enrich_count = enrich_items(ocean_backend, enrich_backend)
  File "/usr/local/lib/python3.7/dist-packages/grimoire_elk/elk.py", line 350, in enrich_items
    total = enrich_backend.enrich_items(ocean_backend)
  File "/usr/local/lib/python3.7/dist-packages/grimoire_elk/enriched/enrich.py", line 393, in enrich_items
    rich_item = self.get_rich_item(item)
  File "/usr/local/lib/python3.7/dist-packages/grimoire_elk/enriched/enrich.py", line 98, in decorator
    eitem = func(self, *args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/grimoire_elk/enriched/gitter.py", line 121, in get_rich_item
    eitem.update(self.get_rich_links(item['data']))
  File "/usr/local/lib/python3.7/dist-packages/grimoire_elk/enriched/gitter.py", line 143, in get_rich_links
    self.extract_issues(item['issues'], item['html'])
  File "/usr/local/lib/python3.7/dist-packages/grimoire_elk/enriched/gitter.py", line 163, in extract_issues
    if links_found[i].split('/')[-2] == 'issues':
IndexError: list index out of range

I'm not sure if it is the [i] or [-2], but a more detailed raised error would help.

I think the IndexError should probably be handled here too somehow: https://github.com/chaoss/grimoirelab-elk/blob/b626512cd2768287bd1e52e98c7773073be21fc1/grimoire_elk/enriched/gitter.py#L157-L169


If there is an index error, does that mean the gitter message is not enriched and added to the index? Will it be attempted to be enriched again and added to the index?

k----n avatar Jan 30 '22 06:01 k----n