tagger.remove_album crashes inside register_album_metadata_processor handler

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Normal
    • 3.0.0b3
    • Affects Version/s: 3.0.0b1
    • Component/s: Plugins API
    • None
    • Environment:
      MacOS ARM

      The following plugin causes a crash.  I realize it is nonsensical, but I was working on one that would remove albums under certain conditions.

       

      from picard.plugin3.api import PluginApi, Album

      from PyQt6.QtCore import QCoreApplication

       

       

      def remove_albums_on_load(api, album, metadata, release):

               api.tagger.remove_album(album)

              QCoreApplication.processEvents()

       

      def enable(api: PluginApi):

          api.register_album_metadata_processor(remove_albums_on_load)

       

      Details...

       

      Traceback (most recent call last):
        File "picard/webservice/_init_.py", line 644, in _process_reply
        File "picard/webservice/_init_.py", line 629, in _handle_reply
        File "picard/album.py", line 505, in _release_request_finished
        File "picard/album.py", line 784, in _finalize_loading
        File "picard/album.py", line 741, in _finalize_loading_album
      AttributeError: 'NoneType' object has no attribute 'isSelected'

            Assignee:
            Bob Swift
            Reporter:
            Steve Martin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                Version Package
                3.0.0b3