dschep / install-poetry-action

A Github action to install poetry
MIT License
31 stars 7 forks source link

Poetry Github Actions are failing with EmptyKeyError #15

Closed rdmolony closed 4 years ago

rdmolony commented 4 years ago

I'm unfortunately feeling a bit lost as both of my Github Actions are failing with an EmptyKeyError & my understanding of Github Actions is not good enough to follow what this means or to debug it, I'd really appreciate any advice (if you have the time) you might have to offer! Thanks for writing & maintaining such a useful library!

- name: Install Poetry
      uses: dschep/install-poetry-action@v1.2

- name: Set Poetry config
      run: |
        poetry config virtualenvs.in-project false
        poetry config virtualenvs.path ~/.virtualenvs

fails with the following error:

Run poetry config virtualenvs.in-project false
  poetry config virtualenvs.in-project false
  poetry config virtualenvs.path ~/.virtualenvs
  shell: /bin/bash -e {0}
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.8.5/x64

[EmptyKeyError]
Empty key at line 3 col 0
##[error]Process completed with exit code 1.

&

- name: Install Poetry
      uses: dschep/install-poetry-action@v1.2

    - run: poetry build
    - run: poetry publish --username=__token__ --password=${{ secrets.PYPI_TOKEN }}

fails with:

Run poetry build
  poetry build
  shell: /bin/bash -e {0}
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.8.5/x64

[EmptyKeyError]
Empty key at line 3 col 0
##[error]Process completed with exit code 1.

Is /opt/hostedtoolcache/Python/3.8.5/x64 being passed to /bin/bash -e {0} but it is empty?

How might I debug this? If you're interested in the full logs see this link

I adapted my build.yml Github Action file from this very helpful Medium.com article Blazing fast CI with GitHub Actions, Poetry, Black and Pytest.

rdmolony commented 4 years ago

I found this poetry issue which resolved my problem.

I was also able to use the handy tmate library for debugging