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

Crashing on github actions #426

Closed
tobymao opened this issue Jan 6, 2022 · 3 comments
Closed

Crashing on github actions #426

tobymao opened this issue Jan 6, 2022 · 3 comments

Comments

@tobymao
Copy link

tobymao commented Jan 6, 2022

Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.10.1/x64/lib/python3.10/site-packages/build/__main__.py", line 372, in main
    built = build_call(
  File "/opt/hostedtoolcache/Python/3.10.1/x64/lib/python3.10/site-packages/build/__main__.py", line 242, in build_package_via_sdist
    out = _build(isolation, builder, outdir, distribution, config_settings, skip_dependency_check)
  File "/opt/hostedtoolcache/Python/3.10.1/x64/lib/python3.10/site-packages/build/__main__.py", line 140, in _build
    return _build_in_isolated_env(builder, outdir, distribution, config_settings)
  File "/opt/hostedtoolcache/Python/3.10.1/x64/lib/python3.10/site-packages/build/__main__.py", line 110, in _build_in_isolated_env
    env.install(builder.get_requires_for_build(distribution))
  File "/opt/hostedtoolcache/Python/3.10.1/x64/lib/python3.10/site-packages/build/env.py", line 211, in install
    _subprocess(cmd)
  File "/opt/hostedtoolcache/Python/3.10.1/x64/lib/python3.10/site-packages/build/env.py", line 81, in _subprocess
    raise e
  File "/opt/hostedtoolcache/Python/3.10.1/x64/lib/python3.10/site-packages/build/env.py", line 78, in _subprocess
    subprocess.check_output(cmd, stderr=subprocess.STDOUT)
  File "/opt/hostedtoolcache/Python/3.10.1/x64/lib/python3.10/subprocess.py", line 420, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/opt/hostedtoolcache/Python/3.10.1/x64/lib/python3.10/subprocess.py", line 524, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/tmp/build-env-tikhb2f9/bin/python', '-Im', 'pip', 'install', '--use-pep517', '--no-warn-script-location', '-r', '/tmp/build-reqs-yrxtnvq7.txt']' returned non-zero exit status 1.

https://github.com/tobymao/saq/runs/4722914855?check_suite_focus=true

@cdfmlr
Copy link

cdfmlr commented Jan 6, 2022

Same problem for my https://github.com/cdfmlr/pyflowchart/runs/4722741335?check_suite_focus=true.

And I noticed that there is an Error log above the Traceback:

/tmp/build-env-_dgkelpo/bin/python: Error while finding module specification for 'pip' (AttributeError: module '__main__' has no attribute '__file__')

I can also reproduce it on my laptop:

$ python -m build --sdist --wheel --outdir dist/ .
* Creating venv isolated environment...
* Installing packages in isolated environment... (setuptools >= 40.8.0, wheel)
* Getting dependencies for sdist...
running egg_info
writing manifest file 'pyflowchart.egg-info/SOURCES.txt'
* Building sdist...
...
* Creating venv isolated environment...
* Installing packages in isolated environment... (setuptools >= 40.8.0, wheel)
* Getting dependencies for wheel...
running egg_info
writing manifest file 'pyflowchart.egg-info/SOURCES.txt'
* Installing packages in isolated environment... (wheel)
/private/var/folders/6w/jqgyt_fs4nxf0q3rr__n60wc0000gn/T/build-env-6t3mvqur/bin/python: Error while finding module specification for 'pip' (AttributeError: module '__main__' has no attribute '__file__')

Traceback (most recent call last):
...
ERROR Command '['/var/folders/6w/jqgyt_fs4nxf0q3rr__n60wc0000gn/T/build-env-6t3mvqur/bin/python', '-Im', 'pip', 'install', '--use-pep517', '--no-warn-script-location', '-r', '/var/folders/6w/jqgyt_fs4nxf0q3rr__n60wc0000gn/T/build-reqs-_3h3idag.txt']' returned non-zero exit status 1.

And I found adding a --no-isolation solves it:

$ python -m build --sdist --wheel --no-isolation --outdir dist/ .
* Getting dependencies for sdist...
...
* Building sdist...
...
* Getting dependencies for wheel...
...
* Building wheel...
...
Successfully built pyflowchart-0.1.4.tar.gz and pyflowchart-0.1.4-py3-none-any.whl

@henryiii
Copy link
Contributor

henryiii commented Jan 6, 2022

I think this was a temporary networking problem and is resolved, can you retry?

@cdfmlr
Copy link

cdfmlr commented Jan 6, 2022

@henryiii I have retried. And it now works fine, both in a local environment and the GitHub Action.

@tobymao tobymao closed this as completed Jan 6, 2022
StefanGreve referenced this issue in nstrydom2/anonfile-api Aug 8, 2023
* attempt to solve build issue
* for further details see also:
  #94 (comment)
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

3 participants