Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: target argument are still required by install-src #795

Open
1 task done
trim21 opened this issue Jun 11, 2024 · 2 comments
Open
1 task done

[Bug]: target argument are still required by install-src #795

trim21 opened this issue Jun 11, 2024 · 2 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@trim21
Copy link

trim21 commented Jun 11, 2024

Bug description

/opt/hostedtoolcache/Python/3.11.9/x64/bin/python3 -m aqt install-src linux 6.5.* --outputdir /home/runner/work/actions-cron/Qt --archives qtbase fall to run becase aqt think target is "None"

but document says it's deprecated and its value is ignored.

ERROR   : Target 'None' is invalid
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/aqt/installer.py", line 108, in run
    args.func(args)
  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/aqt/installer.py", line 423, in run_install_src
    Cli._determine_qt_version(args.qt_version_spec, args.host, args.target, arch="", base_url=base)
  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/aqt/installer.py", line 225, in _determine_qt_version
    version = choose_highest(version, opt_version_for_spec(ext, spec))
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/aqt/installer.py", line 210, in opt_version_for_spec
    return MetadataFactory(ArchiveId("qt", host, target, ext), spec=_spec, base_url=base_url).getList().latest()
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/aqt/metadata.py", line 226, in __init__
    raise ValueError("Target '{}' is invalid".format(target))
ValueError: Target 'None' is invalid
ERROR   : aqtinstall(aqt) v3.0.4 on Python 3.11.9 [CPython GCC 13.2.0]
Working dir: `/home/runner/work/actions-cron/actions-cron`
Arguments: `['/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/aqt/__main__.py', 'install-src', 'linux', '6.5.*', '--outputdir', '/home/runner/work/actions-cron/Qt', '--archives', 'qtbase']` Host: `uname_result(system='Linux', node='fv-az1670-614', release='6.8.0-1007-azure', version='#7-Ubuntu SMP Sat Apr 20 00:06:31 UTC 2024', machine='x86_64')`
===========================PLEASE FILE A BUG REPORT===========================
You have discovered a bug in aqt.

Expected behavior

should install source as expected

aqt and python version

aqtinstall(aqt) v3.0.4 on Python 3.11.9 [CPython GCC 13.2.0]

or with version 3.1.*

Operating System

Linux/Unix

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@trim21 trim21 added bug Something isn't working triage labels Jun 11, 2024
@pzhlkj6612
Copy link
Contributor

@trim21
Copy link
Author

trim21 commented Jun 11, 2024

I'm guessing it's caused by this:

default=None,

default value None is convert to 'None' by argparse, but install-src still use it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants