[BUG] --version选项错误
- Vorherrschende Sprache
- Python
- Sterne
- 4.4k
- Forks
- 593
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
**问题描述(Question description)**
music-dl --version
命令报错:
> Traceback (most recent call last):
> File "/home/username/.local/bin/music-dl", line 8, in
> sys.exit(main())
> File "/usr/lib/python3/dist-packages/click/core.py", line 1128, in __call__
> return self.main(*args, **kwargs)
> File "/usr/lib/python3/dist-packages/click/core.py", line 1052, in main
> with self.make_context(prog_name, args, **extra) as ctx:
> File "/usr/lib/python3/dist-packages/click/core.py", line 914, in make_context
> self.parse_args(ctx, args)
> File "/usr/lib/python3/dist-packages/click/core.py", line 1370, in parse_args
> value, args = param.handle_parse_result(ctx, opts, args)
> File "/usr/lib/python3/dist-packages/click/core.py", line 2347, in handle_parse_result
> value = self.process_value(ctx, value)
> File "/usr/lib/python3/dist-packages/click/core.py", line 2309, in process_value
> value = self.callback(ctx, self, value)
> File "/usr/lib/python3/dist-packages/click/decorators.py", line 380, in callback
> raise RuntimeError(
> RuntimeError: 'music_dl' is not installed. Try passing 'package_name' instead.
**使用的环境(Environment)**
- 安装方式(Installation method):pip
- music-dl版本(music-dl version):
- 操作系统版本(OS version):ubuntu 22.04
- Python版本(Python version):Python 3.10.6
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
The error occurs when running `music-dl --version`. Look at the entry point in `/home/username/.local/bin/music-dl` and the main function in the click application. Check how the version callback is defined and why it's trying to get package info. The fix likely involves correcting the package name or the way version is retrieved in the click command setup.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- cli
- Issue-Typ
- Bug
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 65/100