Skip to content

Commit

Permalink
Disable Poetry experimental new installer
Browse files Browse the repository at this point in the history
python-poetry/poetry#3811
python-poetry/poetry#4210

Poetry installs are erroring with `JSONDecodeError`s in GitHub Actions:

```text
poetry install --no-interaction -E all

[debug]/usr/bin/bash -e /home/runner/work/_temp/0ba5f2f1-9726-40f5-9c09-24f1a8c4158a.sh

Creating virtualenv fastenv in /home/runner/work/fastenv/fastenv/.venv
Installing dependencies from lock file

Package operations: 53 installs, 0 updates, 0 removals

  • Installing six (1.16.0)

  JSONDecodeError

  Expecting value: line 1 column 1 (char 0)

at /opt/hostedtoolcache/Python/3.9.7/x64/lib/python3.9/json/decoder.py:355 in raw_decode
  351│         """
  352│         try:
  353│             obj, end = self.scan_once(s, idx)
  354│         except StopIteration as err:
→ 355│             raise JSONDecodeError("Expecting value", s, err.value) from None
  356│         return obj, end
  357│
```

`poetry cache clear --all pypi --no-interaction` does not fix the issue.
Removing the actions/cache step for Poetry fixes the issue.
Disabling the experimental new installer also fixes the issue.

Disable installer with `poetry config experimental.new-installer false`,
which updates poetry.toml.

Additionally, the setting is not correctly implemented as a Boolean, so
`export POETRY_EXPERIMENTAL_NEW_INSTALLER=false` does not disable the
installer (python-poetry/poetry#3811). It can be set to an empty string,
or disabled using `poetry config experimental.new-installer false` and
updating poetry.toml.

This commit will disable the experimental new installer in poetry.toml.
  • Loading branch information
br3ndonland committed Nov 1, 2021
1 parent 861f16e commit bd58436
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions poetry.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
[experimental]
new-installer = false

[virtualenvs]
in-project = true

0 comments on commit bd58436

Please sign in to comment.