bandprotocol/pyband

poetry install fails on ledgerblue 0.1.42

Closed this issue · 5 comments

hey there! i'm running into some errors with pyband. i first encountered the error while trying to deploy the vrf-worker to google cloud; but i also get it if i just clone the repo and run poetry install

any insight into what's going on here? thanks in advance for your time and your help!!


  CalledProcessError

  Command '['/usr/local/bin/python', '-m', 'pip', 'install', '--use-pep517', '--disable-pip-version-check', '--prefix', '/usr/local', '--no-deps', '/root/.cache/pypoetry/artifacts/a5/20/17/b9eb1363c036b61e4ae09938c0cc5883992db32f2bb81d2194aed272b2/ledgerblue-0.1.42.tar.gz']' returned non-zero exit status 1.

  at /usr/local/lib/python3.10/subprocess.py:526 in run
       522│             # We don't call process.wait() as .__exit__ does that for us.
       523│             raise
       524│         retcode = process.poll()
       525│         if check and retcode:
    →  526│             raise CalledProcessError(retcode, process.args,
       527│                                      output=stdout, stderr=stderr)
       528│     return CompletedProcess(process.args, retcode, stdout, stderr)
       529│ 
       530│ 

The following error occurred when trying to handle this error:


  EnvCommandError

  Command ['/usr/local/bin/python', '-m', 'pip', 'install', '--use-pep517', '--disable-pip-version-check', '--prefix', '/usr/local', '--no-deps', '/root/.cache/pypoetry/artifacts/a5/20/17/b9eb1363c036b61e4ae09938c0cc5883992db32f2bb81d2194aed272b2/ledgerblue-0.1.42.tar.gz'] errored with the following return code 1, and output: 
  Processing /root/.cache/pypoetry/artifacts/a5/20/17/b9eb1363c036b61e4ae09938c0cc5883992db32f2bb81d2194aed272b2/ledgerblue-0.1.42.tar.gz
    Installing build dependencies: started
    Installing build dependencies: finished with status 'done'
    Getting requirements to build wheel: started
    Getting requirements to build wheel: finished with status 'error'
    error: subprocess-exited-with-error
    
    × Getting requirements to build wheel did not run successfully.
    │ exit code: 1
    ╰─> [1 lines of output]
        error in ledgerblue setup command: 'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.
        [end of output]
    
    note: This error originates from a subprocess, and is likely not a problem with pip.
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  

  at /usr/local/lib/python3.10/site-packages/poetry/utils/env.py:1476 in _run
      1472│                 output = subprocess.check_output(
      1473│                     command, stderr=subprocess.STDOUT, env=env, **kwargs
      1474│                 )
      1475│         except CalledProcessError as e:
    → 1476│             raise EnvCommandError(e, input=input_)
      1477│ 
      1478│         return decode(output)
      1479│ 
      1480│     def execute(self, bin: str, *args: str, **kwargs: Any) -> int:

The following error occurred when trying to handle this error:


  PoetryException

  Failed to install /root/.cache/pypoetry/artifacts/a5/20/17/b9eb1363c036b61e4ae09938c0cc5883992db32f2bb81d2194aed272b2/ledgerblue-0.1.42.tar.gz

  at /usr/local/lib/python3.10/site-packages/poetry/utils/pip.py:51 in pip_install
       47│ 
       48│     try:
       49│         return environment.run_pip(*args)
       50│     except EnvCommandError as e:
    →  51│         raise PoetryException(f"Failed to install {path.as_posix()}") from e
       52│ 

The command '/bin/sh -c poetry config virtualenvs.create false && poetry install --no-dev --no-interaction --no-ansi' returned a non-zero code: 1
ERROR
ERROR: build step 0 "gcr.io/cloud-builders/docker" failed: step exited with non-zero status: 1

Hi, could you try to run these commands before poetry install?

poetry run pip install setuptools==65.6.3 
poetry run pip install ledgerblue==0.1.42

hi! running those commands on their own doesn't help; when i try to run poetry install it installs the wrong ones again.

however, it does work if i set my .toml file to have setuptools=65.6.3 and then run poetry installwhen i'm inside the pyband repository directly!

... sadly, when i try that from band-vrf-worker, it still errors on ledgerblue 0.1.42 - i think because pyband 0.3.4 that vrf-worker points at uses the setuptools internally that causes the error.

is there a way to point poetry inside of band-vrf-worker at a local fork of pyband or something where i can change the setuptools version, until this is patched? thanks! :)

Hi, sorry for the late reply. May I know how you run band-vrf-worker? And, what's your python version?

Could you try to run this command with python3.10 before poetry install in band-vrf-worker?

poetry run pip install pyband

I encountered the same issue in the vrf worker and created a PR that fixes that issue.
@imgntn : In the meantime you can install my fork (or your own) from git via:

  1. Removing pyband from the pyproject.toml inside band-vrf-worker
  2. Re-adding it from git: poetry add git+https://github.com/chrisCryptoCom/pyband.git

This fixed the installation issue in band-vrf-worker for me.

Hi, we have released the new version (https://pypi.org/project/pyband/0.3.5/) to fix this issue.