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

Metadata comparison for recordings raises exception if length is None

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 2.11.0rc1
    • 2.10.0
    • Tags & Metadata
    • None

      If the there is no length for a recording loaded in MB the following exception is logged:

        File "/home/phw/devel/musicbrainz/picard/picard/metadata.py", line 371, in compare_to_track
          score = self.length_score(a, b)
                  ^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/phw/devel/musicbrainz/picard/picard/metadata.py", line 209, in length_score
          return (1.0 - min(abs(a - b),
                                ~~^~~
      TypeError: unsupported operand type(s) for -: 'int' and 'NoneType'

            outsidecontext Philipp Wolfer
            outsidecontext Philipp Wolfer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package
                2.11.0rc1