Uploaded image for project: 'Picard'
  1. Picard
  2. PICARD-753

Divide by zero error in _convert_folksonomy_tags_to_genre when no tag at the release/release group level

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 1.3.2
    • Fix Version/s: 1.4
    • Component/s: Tags & Metadata
    • Labels:
      None
    • Environment:
      windows 7

      Description

      When trying to load the following release with the "use folksonomy tags as a genre" option activated:
      http://beta.musicbrainz.org/release/268b37e9-97c5-4235-99bc-85935625f63f

      I get the following error message in picard.exe.log:

      ZeroDivisionError: integer division or modulo by zero
      Traceback (most recent call last):
      File "picard\webservice.pyo", line 291, in _process_reply
      File "picard\coverart\providers\caa.pyo", line 194, in _caa_json_downloaded
      File "picard\coverart\providers_init_.pyo", line 81, in next_in_queue
      File "picard\coverart_init_.pyo", line 141, in download_next_in_queue
      File "picard\coverart_init_.pyo", line 141, in download_next_in_queue
      File "picard\coverart_init_.pyo", line 141, in download_next_in_queue
      File "picard\coverart_init_.pyo", line 145, in download_next_in_queue
      File "picard\album.pyo", line 223, in _finalize_loading
      File "picard\album.pyo", line 294, in _finalize_loading_track
      File "picard\track.pyo", line 124, in _customize_metadata
      File "picard\track.pyo", line 142, in _convert_folksonomy_tags_to_genre

      The line 143 is for Picard 1.3.2:
      taglist.append((100 * count / maxcount, name))

      We can note also for that release this current status at this stage:

      • some tags have been added at the recording level
      • there is no tag at the release level
      • there is not tag at the release group level

      And, with that current status:

      • If I add a tag at the release or release group level, it loads properly.
      • If I remove that tag I receive again that divide by zero error message.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                zas Zas
                Reporter:
                ebz777 ebz777
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: