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

Poetry fails during install after setup in GitHub Actions #25

Closed
HenriqueAJNB opened this issue Sep 23, 2021 · 5 comments
Closed

Poetry fails during install after setup in GitHub Actions #25

HenriqueAJNB opened this issue Sep 23, 2021 · 5 comments

Comments

@HenriqueAJNB
Copy link

I'm facing a problem with Poetry and GitHub actions in the last days. Maybe because Poetry has an updated version.

Information

  • Poetry version 1.1.9
  • Python 3.9

I'm using the following .yml file for the CI/CD

jobs:
  execute-linters:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Pyton 3.9
        uses: actions/setup-python@v2
        with:
          python-version: 3.9

      - name: Poetry
        uses: Gr1N/setup-poetry@v7
      
      - name: Dependencies
        run: poetry install
...

Whenever it runs, during the Dependencies job, it fails and I've got the following error

• Installing py (1.10.0)

  EnvCommandError

  Command ['/home/runner/work/ds-gdem-pvso/ds-gdem-pvso/.venv/bin/pip', 'install', '--no-deps', '/home/runner/.cache/pypoetry/artifacts/c8/3a/b1/6d8182aff6a688801f32ca473f2ba55ecb83446a84cf3d1afad18800e0/ibm_db-3.0.4.tar.gz'] errored with the following return code 1, and output: 
  Processing /home/runner/.cache/pypoetry/artifacts/c8/3a/b1/6d8182aff6a688801f32ca473f2ba55ecb83446a84cf3d1afad18800e0/ibm_db-3.0.4.tar.gz
      ERROR: Command errored out with exit status 1:
       command: /home/runner/work/ds-gdem-pvso/ds-gdem-pvso/.venv/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-c_nfk704/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-c_nfk704/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-9hi5cw5y
           cwd: /tmp/pip-req-build-c_nfk704/
      Complete output (3 lines):
      Detected 64-bit Python
      Downloading https://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/linuxx64_odbc_cli.tar.gz
      error in ibm_db setup command: use_2to3 is invalid.
      ----------------------------------------
  WARNING: Discarding file:///home/runner/.cache/pypoetry/artifacts/c8/3a/b1/6d8182aff6a688801f32ca473f2ba55ecb83446a84cf3d1afad18800e0/ibm_db-3.0.4.tar.gz. Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  

  at ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/utils/env.py:1180 in _run
      1176│                 output = subprocess.check_output(
      1177│                     cmd, stderr=subprocess.STDOUT, **kwargs
      1178│                 )
      1179│         except CalledProcessError as e:
    → 1180│             raise EnvCommandError(e, input=input_)
      1181│ 
      1182│         return decode(output)
      1183│ 
      1184│     def execute(self, bin, *args, **kwargs):

  • Installing pyarrow (4.0.1)
  • Installing regex (2021.8.28)
  • Installing scikit-learn (0.24.2)
  • Installing toml (0.10.2)
  • Installing tomli (1.2.1)
  • Installing tqdm (4.62.3)
  • Installing typing-inspect (0.7.1)
  • Installing wrapt (1.12.1)
Error: Process completed with exit code 1.

Attempts

At first I was using the Gr1N/setup-poetry@v4 and I notice that it was outdated. I've tried to update it to Gr1N/setup-poetry@v7, but didn't work.

I also received this Warning: The lock file is not up to date with the latest changes in pyproject.toml. You may be getting outdated dependencies. Run update to update them.. I've tried to delete poetry.lock and run poetry update to generate a new one, no success at all.

@fabiogallotti
Copy link

Hello @HenriqueAJNB, I had a similar issue, I solved using Poetry version 1.1.10.
Give it a try!

@HenriqueAJNB
Copy link
Author

HenriqueAJNB commented Sep 23, 2021

Hello @HenriqueAJNB, I had a similar issue, I solved using Poetry version 1.1.10.
Give it a try!

@fabiogallotti you installed in your local computer and then pushed to run the CI/CD? I ran the setup poetry using Gr1N/setup-poetry@v7. Is there a way to specify the poetry version?

Maybe using the following code in .yml file?

- name: Poetry
   uses: Gr1N/setup-poetry@v7
   with:
     poetry: 1.1.10

@fabiogallotti
Copy link

Yes @HenriqueAJNB, you can specify the poetry version like this:

uses: Gr1N/setup-poetry@v7
with:
  poetry-version: 1.1.10

@HenriqueAJNB
Copy link
Author

Tried to run with poetry 1.1.10, same error. It seems to be some cache saved at GitHub Actions server that is blocking my CI/CD to run...

@amotl
Copy link

amotl commented Oct 22, 2021

Hi there,

maybe it is not directly related, but nevertheless I wanted to report it here. At [1], we have been tripped by the error outlined at python-poetry/poetry#4056.

After upgrading to Gr1N/setup-poetry@v7 and poetry-version: 1.1.11 (wireviz/wireviz-web@88db933), everything went back to normal.

Thanks, Nikita!

With kind regards,
Andreas.

[1] https://github.com/daq-tools/wireviz-web/runs/3977875929

@Gr1N Gr1N closed this as completed Dec 26, 2022
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

4 participants