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

aiidalab CLI raises when an invalid commit/branch is specified #396

Open
danielhollas opened this issue Sep 27, 2023 · 0 comments · May be fixed by #426
Open

aiidalab CLI raises when an invalid commit/branch is specified #396

danielhollas opened this issue Sep 27, 2023 · 0 comments · May be fixed by #426
Labels
bug Something isn't working
Milestone

Comments

@danielhollas
Copy link
Contributor

danielhollas commented Sep 27, 2023

I just hit this when I was trying to install my app via CLI directly from Github and made a typo in a branch name.

Traceback (most recent call last):
  File "/opt/conda/lib/python3.9/site-packages/aiidalab/git_util.py", line 177, in read_bytes
    return run(
  File "/opt/conda/lib/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['git', 'show', 'deps/install-xtb-openmpi:.']' returned non-zero exit status 128.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/conda/bin/aiidalab", line 10, in <module>
    sys.exit(cli())
  File "/opt/conda/lib/python3.9/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/opt/conda/lib/python3.9/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/opt/conda/lib/python3.9/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/conda/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/conda/lib/python3.9/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/opt/conda/lib/python3.9/site-packages/aiidalab/__main__.py", line 401, in install
    install_candidates = {
  File "/opt/conda/lib/python3.9/site-packages/aiidalab/__main__.py", line 402, in <dictcomp>
    requirement: _find_version_to_install(
  File "/opt/conda/lib/python3.9/site-packages/aiidalab/__main__.py", line 280, in _find_version_to_install
    with fetch_from_url(app_requirement.url) as repo:
  File "/opt/conda/lib/python3.9/contextlib.py", line 119, in __enter__
    return next(self.gen)
  File "/opt/conda/lib/python3.9/site-packages/aiidalab/fetch.py", line 114, in fetch_from_url
    with _fetch_from_git_https(urlunsplit(ps._replace(scheme="https"))) as path:
  File "/opt/conda/lib/python3.9/contextlib.py", line 119, in __enter__
    return next(self.gen)
  File "/opt/conda/lib/python3.9/site-packages/aiidalab/fetch.py", line 75, in _fetch_from_git_https
    with _fetch_from_path(git_path) as path:
  File "/opt/conda/lib/python3.9/contextlib.py", line 119, in __enter__
    return next(self.gen)
  File "/opt/conda/lib/python3.9/site-packages/aiidalab/fetch.py", line 30, in _fetch_from_path
    with tarfile.open(fileobj=BytesIO(path.read_bytes())) as tar_file:
  File "/opt/conda/lib/python3.9/site-packages/aiidalab/git_util.py", line 194, in read_bytes
    raise ValueError(f"Unknown commit: {self.commit}")
ValueError: Unknown commit: deps/install-xtb-openmpi
@danielhollas danielhollas added the bug Something isn't working label Sep 27, 2023
@danielhollas danielhollas added this to the v23.10 milestone Sep 27, 2023
@danielhollas danielhollas linked a pull request Apr 30, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant