Uploaded image for project: 'ListenBrainz'
  1. ListenBrainz
  2. LB-670

Empty candidate sets cause consumer crashes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • None
    • API, listenbrainz-labs
    • None

      I requested candidate sets for Mr_Monkey with:

      docker exec -it listenbrainz-cron-prod python3 manage.py spark request_candidate_sets --top=40 --similar=15 --html --days=14 --user-name=Mr_Monkey

      And it broke the request_consumer – do user names need to have correct case? In any case (ha!) an empty candidate set causes a crash:

      [2020-07-27 09:26:14,591] INFO in candidate_sets: Fetching listens to get top artists...
      [2020-07-27 09:26:14,622] INFO in candidate_sets: Fetching top artists...
      [2020-07-27 09:26:14,675] INFO in candidate_sets: Preparing top artists candidate set...
      [2020-07-27 09:26:14,701] INFO in candidate_sets: Fetching similar artists...
      [2020-07-27 09:26:14,758] INFO in candidate_sets: Preparing similar artists candidate set...
      [2020-07-27 09:26:14,781] INFO in candidate_sets: Saving candidate sets...
      [2020-07-27 09:26:15,687] ERROR in candidate_sets: Cannot save empty top artist candidate set
      Traceback (most recent call last):
      File "/rec/listenbrainz_spark/recommendations/candidate_sets.py", line 297, in save_candidate_sets
      top_artist_candidate_set_df.take(1)[0]
      IndexError: list index out of range
      Sentry is attempting to send 1 pending error messages
      Waiting up to 10 seconds
      Press Ctrl-C to quit

            kartik1712 amCap1712
            rob Robert Kaye
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package