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

Allow errors on rmtree #665

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

jaimergp
Copy link

Getting errors on uploads from GHA:

Error:  Trouble reading metadata from C:\Miniconda3\conda-bld\win-64\conda-23.5.0.post1-py39h178df7a_1.conda. Is this a valid conda package?
Error:  
Traceback (most recent call last):
  File "C:\Miniconda3\Scripts\anaconda-script.py", line 9, in <module>
    sys.exit(main())
  File "C:\Miniconda3\lib\site-packages\binstar_client\scripts\cli.py", line 154, in main
    binstar_main(command_module, args, _exit,
  File "C:\Miniconda3\lib\site-packages\binstar_client\scripts\cli.py", line 136, in binstar_main
    return args.main(args)
  File "C:\Miniconda3\lib\site-packages\binstar_client\commands\upload.py", line 339, in main
    package_info = upload_package(
  File "C:\Miniconda3\lib\site-packages\binstar_client\commands\upload.py", line 206, in upload_package
    package_attrs, release_attrs, file_attrs = get_attrs(package_type, filename, parser_args=args)
  File "C:\Miniconda3\lib\site-packages\binstar_client\utils\detect.py", line 153, in get_attrs
    return inspector(filename, fileobj, *args, **kwargs)
  File "C:\Miniconda3\lib\site-packages\binstar_client\inspect_package\conda.py", line 159, in inspect_conda_package
    rmtree(tmpdir)
  File "C:\Miniconda3\lib\shutil.py", line 759, in rmtree
    return _rmtree_unsafe(path, onerror)
  File "C:\Miniconda3\lib\shutil.py", line 624, in _rmtree_unsafe
    _rmtree_unsafe(fullname, onerror)
  File "C:\Miniconda3\lib\shutil.py", line 629, in _rmtree_unsafe
    onerror(os.unlink, fullname, sys.exc_info())
  File "C:\Miniconda3\lib\shutil.py", line 627, in _rmtree_unsafe
    os.unlink(fullname)
PermissionError: [WinError 5] Access is denied: 'D:\\a\\_temp\\tmplxka0ri1\\info\\about.json'
Failed to upload due to Command '['anaconda', '--quiet', '--show-traceback', '-t', 'D:\\a\\_temp\\XXXX\\XXXXX.token', 'upload', 'C:\\Miniconda3\\conda-bld\\win-64\\conda-23.5.0.post1-py39h178df7a_1.conda', '--user=napari', '--channel=bundle_tools_3', '--force-metadata-update']' returned non-zero exit status 1.. Trying again in 28.722900390625 seconds

@dholth
Copy link
Contributor

dholth commented Sep 18, 2024

Some files have bad permissions in conda packages; yikes. However #724

@mattkram
Copy link
Collaborator

@jaimergp do you have a reproducible command I could confirm with the change in #724? I'm hoping to have a RC build we could try to confirm the fix works for your issue.

@jaimergp
Copy link
Author

I'm afraid I no longer have access to the repro conditions. It was a CI workflow building conda packages for a conda fork we used in the napari project for a bit, but we have since then upstreamed the fork changes so those CI workflows and repos are now archived.

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

Successfully merging this pull request may close these issues.

3 participants