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

positional arguments cli calls are not being parsed the way picard --help indicates.

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 2.12.3
    • User Interface
    • None
    • GNU bash, version 5.2.37(1)-release (x86_64-pc-linux-gnu)

       

      $ picard --help --version
      usage: picard [-h] [-a AUDIT] [-c CONFIG_FILE] [-d] [-e COMMAND [COMMAND ...]] [-M] [-N] [-P] [--no-crash-dialog]
                    [-s] [-v] [-V]
                    [FILE_OR_URL ...]
      positional arguments:
        FILE_OR_URL           the file(s), URL(s) and MBID(s) to load⋮
      {{}}
      $ picard -e cluster -e lookup clustered .
      I: 23:45:59,894 tagger.main:1546: Sending messages to main instance: ['cluster ', 'lookup clustered', 'lookup .']
      qt.qpa.qgnomeplatform.theme: The desktop style for QtQuick Controls 2 applications is not available on the system (qqc2-desktop-style). The application may look broken.
      QApplication: invalid style override 'Adwaita-Dark' passed, ignoring it.
                Available styles: kvantum-dark, kvantum, Windows, Fusion
      Warning: config file 3.0.0.dev2 was created by a more recent version of Picard (current is 2.12.3.final0)
      W: 23:46:01,598 pluginmanager.plugin_error:229: Plugin "Add Cluster As Release" from "/home/$USER/.config/MusicBrainz/Picard/plugins/addrelease.py" is not compatible with this version of Picard.
      ⋮W: 23:46:01,959 ui/playertoolbar.{}init{}:106: Internal player: unavailable, cannot import name 'QtMultimedia' from 'PyQt5' (/usr/lib/python3/dist-packages/PyQt5/{}init{}.py)
      E: 23:46:02,340 tagger.handle_command_lookup:522: Invalid LOOKUP command argument: '.'
      ^Z
      [1]+  Stopped                 picard -e cluster -e lookup clustered .
      $ bg; picard . -e cluster -e lookup clustered &
      [4]+ picard -e cluster -e lookup clustered . &
      [5] 2872200
      $ I: 00:08:18,429 tagger.main:1546: Sending messages to main instance: ['LOAD /library/music', 'cluster ', 'lookup clustered'][5]+  Exit 195                picard . -e cluster -e lookup clustered
      $ 
       
      

       

      When called as picard -e <command> <path> it fails to load the <path>.  In the example above it is `.` but I've used the absolute path as well and it fails as well.

      When called as picard <path> -e <command>, it loads.  

      So that leads me to the conclusion that either it isn't parsing those positional arguments the way it was presumably intended based on picard --help OR the --help is wrong and the positional arguments belong before the flags.

       

       

            Unassigned Unassigned
            iconoclasthero iconclast hero
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                Version Package