Skip to content

TST: pyinstaller job broken with ModuleNotFoundError: No module named 'backports' #18982

Closed

Description

@pllim

Looks like it has been failing for a few days.

Last success: https://github.com/astropy/astropy/actions/runs/19558814407

First failure: https://github.com/astropy/astropy/actions/runs/19589458395/job/56105080108

astropy/.pyinstaller> ./run_astropy_tests --astropy-root /home/runner/work/astropy/astropy
Traceback (most recent call last):
  File "pyi_rth_pkgres.py", line 177, in <module>
  File "pyi_rth_pkgres.py", line 44, in _pyi_rthook
  File "pyimod02_importers.py", line 457, in exec_module
  File "pkg_resources/__init__.py", line 90, in <module>
  File "pyimod02_importers.py", line 457, in exec_module
  File "setuptools/_vendor/jaraco/text/__init__.py", line 12, in <module>
  File "pyimod02_importers.py", line 457, in exec_module
  File "setuptools/_vendor/jaraco/context.py", line 17, in <module>
ModuleNotFoundError: No module named 'backports'
[PYI-4900:ERROR] Failed to execute script 'pyi_rth_pkgres' due to unhandled exception!

Activity

  1. pllim commented on Nov 24, 2025

    @pllim
    MemberAuthor

    This is the only obvious thing I saw comparing the logs but not sure what it means.

     ['/opt/hostedtoolcache/Python/3.11.14/x64/lib/python311.zip',
      '/opt/hostedtoolcache/Python/3.11.14/x64/lib/python3.11',
      '/opt/hostedtoolcache/Python/3.11.14/x64/lib/python3.11/lib-dynload',
      '/home/runner/work/astropy/astropy/.tox/pyinstaller/lib/python3.11/site-packages',
    - '/home/runner/work/astropy/astropy/.tox/pyinstaller/lib/python3.11/site-packages/setuptools/_vendor',
      '/home/runner/work/astropy/astropy/.pyinstaller']
  2. pllim commented on Nov 24, 2025

    @pllim
    MemberAuthor
  3. neutrinoceros commented on Nov 24, 2025

    @neutrinoceros
    Contributor

    If it's been failing for a few days then I don't see how my PR, only merged a couple hours ago, could be the culprit.

  4. neutrinoceros commented on Nov 24, 2025

    @neutrinoceros
    Contributor

    Also, this looks like the kind of regression that lock files would help a lot to work around. I can take a deeper look at this in about 30min

  5. pllim commented on Nov 24, 2025

    @pllim
    MemberAuthor

    Yeah, that's not it. Might be upstream.

  6. pllim commented on Nov 24, 2025

    @pllim
    MemberAuthor

    I asked at https://github.com/orgs/pyinstaller/discussions/9315

    Re: lockfile -- That job doesn't use tox so I am not sure how uv stuff is relevant, but also out of scope here.

  7. neutrinoceros commented on Nov 24, 2025

    @neutrinoceros
    Contributor

    Wait am I reading the log wrong ? The command that is failing seems to be tox -e pyinstaller 🙃

  8. neutrinoceros commented on Nov 24, 2025

    @neutrinoceros
    Contributor

    (that said, we would indeed not have caught this if we were using lock files *given that uv doesn't know about pyinstaller and its dependencies, but that can be fixed on our side. I'll open a PR)

  9. pllim commented on Nov 24, 2025

    @pllim
    MemberAuthor

    pyinstaller dev confirmed that they patched it upstream but we have to wait for them to do a new release, so I don't think we have to do anything here but wait. FYI.

  10. pllim commented on Nov 24, 2025

    @pllim
    MemberAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions