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

Can't add package from github pull request #5130

Closed
3 tasks done
dmwyatt opened this issue Jan 31, 2022 · 2 comments
Closed
3 tasks done

Can't add package from github pull request #5130

dmwyatt opened this issue Jan 31, 2022 · 2 comments
Labels
kind/bug Something isn't working as expected

Comments

@dmwyatt
Copy link

dmwyatt commented Jan 31, 2022

  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

Issue

This works to install from a GH pull request:
poetry run pip install git+https://github.com/enthought/comtypes@refs/pull/259/merge

This does not:
poetry add -vvv git+https://github.com/enthought/comtypes@refs/pull/259/merge

Output from not-working command:

❯ poetry add -vvv git+https://github.com/enthought/comtypes@refs/pull/259/merge
Creating virtualenv poetry-test-delete-me-4nTYJAHO-py3.10 in C:\Users\dustin\AppData\Local\pypoetry\Cache\virtualenvs
Using virtualenv: C:\Users\dustin\AppData\Local\pypoetry\Cache\virtualenvs\poetry-test-delete-me-4nTYJAHO-py3.10

  Stack trace:

  11  ~\.local\pipx\venvs\poetry\lib\site-packages\clikit\console_application.py:131 in run
       129│             parsed_args = resolved_command.args
       130│
     → 131│             status_code = command.handle(parsed_args, io)
       132│         except KeyboardInterrupt:
       133│             status_code = 1

  10  ~\.local\pipx\venvs\poetry\lib\site-packages\clikit\api\command\command.py:120 in handle
       118│     def handle(self, args, io):  # type: (Args, IO) -> int
       119│         try:
     → 120│             status_code = self._do_handle(args, io)
       121│         except KeyboardInterrupt:
       122│             if io.is_debug():

   9  ~\.local\pipx\venvs\poetry\lib\site-packages\clikit\api\command\command.py:171 in _do_handle
       169│         handler_method = self._config.handler_method
       170│
     → 171│         return getattr(handler, handler_method)(args, io, self)
       172│
       173│     def __repr__(self):  # type: () -> str

   8  ~\.local\pipx\venvs\poetry\lib\site-packages\cleo\commands\command.py:92 in wrap_handle
        90│         self._command = command
        91│
     →  92│         return self.handle()
        93│
        94│     def handle(self):  # type: () -> Optional[int]

   7  ~\.local\pipx\venvs\poetry\lib\site-packages\poetry\console\commands\add.py:106 in handle
       104│             return 0
       105│
     → 106│         requirements = self._determine_requirements(
       107│             packages,
       108│             allow_prereleases=self.option("allow-prereleases"),

   6  ~\.local\pipx\venvs\poetry\lib\site-packages\poetry\console\commands\init.py:320 in _determine_requirements
       318│             return requires
       319│
     → 320│         requires = self._parse_requirements(requires)
       321│         result = []
       322│         for requirement in requires:

   5  ~\.local\pipx\venvs\poetry\lib\site-packages\poetry\console\commands\init.py:410 in _parse_requirements
       408│                         pair["extras"] = extras
       409│
     → 410│                     package = Provider.get_package_from_vcs(
       411│                         "git", url.url, rev=pair.get("rev")
       412│                     )

   4  ~\.local\pipx\venvs\poetry\lib\site-packages\poetry\puzzle\provider.py:196 in get_package_from_vcs
       194│             reference = branch or tag or rev
       195│             if reference is not None:
     → 196│                 git.checkout(reference, tmp_dir)
       197│             else:
       198│                 reference = "HEAD"

   3  ~\.local\pipx\venvs\poetry\lib\site-packages\poetry\core\vcs\git.py:281 in checkout
       279│         args += ["checkout", rev]
       280│
     → 281│         return self.run(*args)
       282│
       283│     def rev_parse(self, rev, folder=None):  # type: (str, Optional[Path]) -> str

   2  ~\.local\pipx\venvs\poetry\lib\site-packages\poetry\core\vcs\git.py:356 in run
       354│
       355│         return decode(
     → 356│             subprocess.check_output(
       357│                 [executable()] + list(args), stderr=subprocess.STDOUT
       358│             )

   1  ~\.pyenv\pyenv-win\versions\3.10.0\lib\subprocess.py:420 in check_output
        418│         kwargs['input'] = empty
        419│
     →  420│     return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
        421│                **kwargs).stdout
        422│

  CalledProcessError

  Command '['C:\\Program Files\\Git\\cmd\\git.exe', '--git-dir', 'C:/Users/dustin/AppData/Local/Temp/pypoetry-git-comtypeszpmpd9pq/.git', '--work-tree', 'C:/Users/dustin/AppData/Local/Temp/pypoetry-git-comtypeszpmpd9pq', 'checkout', 'refs/pull/259/merge']' returned non-zero exit status 1.

  at ~\.local\pipx\venvs\poetry\lib\site-packages\poetry\utils\_compat.py:217 in run
      213│                 process.wait()
      214│                 raise
      215│             retcode = process.poll()
      216│             if check and retcode:
    → 217│                 raise CalledProcessError(
      218│                     retcode, process.args, output=stdout, stderr=stderr
      219│                 )
      220│         finally:
      221│             # None because our context manager __exit__ does not use them.
@dmwyatt dmwyatt added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Jan 31, 2022
@finswimmer
Copy link
Member

Hey,

this is a duplicate of #3240.

fin swimmer

@abn abn removed the status/triage This issue needs to be triaged label Mar 3, 2022
Copy link

github-actions bot commented Mar 2, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

3 participants