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

Fatal uncaught exception "aqt/installer.py", line 362, in show_aqt_version. Related: python3.6/dist-packages/importlib_metadata #222

Closed
pestophagous opened this issue Feb 24, 2021 · 2 comments

Comments

@pestophagous
Copy link

module_name = dist.entry_points[0].name

I'm not confident to say whether or not this is a bug in aqtinstall or not.

Other possibilities:

  • something wrong with py 3.6 importlib_metadata
  • something wrong with the packaging or dist-info or "entry_points.txt" that pip downloads

This started failing for me "out of nowhere." It was working in one CI job, then the next time I ran the same job (with no changes to my code or build scripts), this failure happened.

I have a way to replicate it using Docker (see below).

This is the error:

        + python3 -m aqt install --base http://mirrors.ocf.berkeley.edu/qt/ --outputdir /opt/atlassian/pipelines/agent/build/dl_third_party/Qt_desktop 5.15.0 linux desktop --archives icu qtbase qtconnectivity qtdeclarative qtgraphicaleffects qtimageformats qtquickcontrols qtquickcontrols2 qtsvg qttools
        Traceback (most recent call last):
          File "/usr/local/lib/python3.6/dist-packages/importlib_metadata/__init__.py", line 170, in __getitem__
            return next(iter(self.select(name=name)))
        StopIteration
        During handling of the above exception, another exception occurred:
        Traceback (most recent call last):
          File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
            "__main__", mod_spec)
          File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
            exec(code, run_globals)
          File "/usr/local/lib/python3.6/dist-packages/aqt/__main__.py", line 27, in <module>
            sys.exit(main())
          File "/usr/local/lib/python3.6/dist-packages/aqt/__init__.py", line 38, in main
            return cli.run()
          File "/usr/local/lib/python3.6/dist-packages/aqt/installer.py", line 475, in run
            return args.func(args)
          File "/usr/local/lib/python3.6/dist-packages/aqt/installer.py", line 214, in run_install
            self._run_common_part(output_dir, base)
          File "/usr/local/lib/python3.6/dist-packages/aqt/installer.py", line 157, in _run_common_part
            self.show_aqt_version()
          File "/usr/local/lib/python3.6/dist-packages/aqt/installer.py", line 362, in show_aqt_version
            module_name = dist.entry_points[0].name
          File "/usr/local/lib/python3.6/dist-packages/importlib_metadata/__init__.py", line 172, in __getitem__
            raise KeyError(name)
        KeyError: 0

Here is a docker file that will reproduce the failure:

FROM ubuntu:18.04

RUN apt-get update

RUN apt-get --assume-yes install  python3
RUN apt-get --assume-yes install  python3-pip

RUN pip3 install -Iv aqtinstall==1.1.2

RUN python3 -m aqt install --base  --outputdir /tmp/Qt 5.15.0 linux desktop --archives icu qtbase qtconnectivity qtdeclarative qtgraphicaleffects qtimageformats qtquickcontrols qtquickcontrols2 qtsvg qttools

Versioning clue?? If you simply replace this:

FROM ubuntu:18.04

With this:

FROM ubuntu:20.04

And re-run docker build, then you can see it succeeds on Ubuntu 20.

@pestophagous
Copy link
Author

I accidentally created this duplicate case. Please see issue #221

@miurahr
Copy link
Owner

miurahr commented Feb 25, 2021

v1.1.3 out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants