pythonpyenvpython-poetrypyenv-virtualenv

All my poetry commands fail with 'The Poetry config is invalid'


I am working on macOS Monterey version 12.6 running Python 3.9.9 with Poetry 1.2.1. I'm trying to install all dependancies for my project from pyproject.toml with 'poetry install' ,and I keep getting the message

The Poetry config is invalid:   
    - [description] '    Tombstone is basically composed of a web server process (apiv2 web\n
    server) and a celery worker process\n
    (aiworker) for running async/background tasks outside\n
    of a web request context.\n'
does not match '^[^\n]*$'

This doesn't give me much to go off of as far as debugging is concerned. The description is just line 4 of my pyproject.toml.

I have tried to uninstall Poetry and reinstall using Homebrew. I have also tried acting moving the poetry config to a different location inside my system, but I keep getting this error.

Here is the pyproject.toml:

[tool.poetry]
authors = 
description = """
    Tombstone is basically composed of a web server process (apiv2 web
    server) and a celery worker process
    (aiworker) for running async/background tasks outside
    of a web request context.
"""
name = "tombstone"
version = "1.0.0"

[[tool.poetry.source]]
name = "tombstone-common-package"
secondary = true
url =

[tool.poetry.dependencies]
Python = ">=3.9,<3.10"
analytics-python = "1.3.1"
arpeggio = "1.10.2"
auth0-python = "3.16.0"
awscli = "1.19.106"
billiard = "3.6.4.0"
boto3 = "1.17.106"
cachecontrol = "0.12.8"
celery = {extras = ["redis", "zstd"], version = "4.4.7"}
celery-slack = "0.4.1"
cffi = "1.15.0"
click = "7.1.2"
dask = "2021.10.0"
distributed = "2021.10.0"
factory-boy = "3.2.1"
faiss-cpu = {version = "1.7.1.post3", markers = "sys_platform == 'darwin' or platform_machine == 'aarch64'"}
faiss-gpu = {version = "1.7.1.post2", markers = "sys_platform == 'linux' and platform_machine == 'x86_64'"}
faker = "8.2.1"
Flask = "2.0.2"
flask-admin = "1.5.8"
flask-caching = "1.10.1"
flask-cors = "3.0.10"
flask-jwt = "0.3.2"
Flask-RESTful = "0.3.9"
flask-restful-swagger-2 = "0.35"
flask-restplus = "0.13.0"
flask-sqlalchemy = "2.5.1"
flower = "0.9.4"
fs = "2.4.13"
fs-s3fs = "1.1.1"
gensim = "4.1.2"
google-auth = "2.3.3"
grpcio = "1.34.1"
gunicorn = "20.1.0"
joblib = "1.1.0"
json-log-formatter = "0.4.0"
marshmallow = "3.14.0"
marshmallow-sqlalchemy = "0.26.1"
matplotlib = "3.4.3"
networkx = "2.6.3"
nltk = "3.6.5"
numba = "0.54.1"
numpy = "1.19.5"
openpyxl = "3.0.9"
packaging = "20.9"
pandas = "1.2.5"
pika = "1.2.0"
prometheus-client = "0.12.0"
prometheus-flask-exporter = "0.18.5"
psycopg2-binary = "2.9.1"
pyarrow = "4.0.1"
pydash = "4.9.3"
pyjwt = "1.4.2"
python-dateutil = "2.8.2"
python-dotenv = "0.19.1"
python-jose = "3.3.0"
pytz = "2021.3"
pyyaml = "5.4.1"
requests = "2.26.0"
s3fs = "0.6.0"
scikit-learn = "1.0.1"
scipy = "1.7.1"
sendgrid = "6.8.3"
seqeval = "1.2.2"
simplejson = "3.17.5"
smart-open = "5.1.0"
sqlalchemy = "1.4.26"
tabulate = "0.8.9"
tensorboard = "2.7.0"
tensorflow = {version = "2.5.1", markers = "platform_machine == 'x86_64'"}
tombstone-common = "0.0.7"
tzlocal = "2.1"

# Tests dependecies. Currently, poetry doesn't support dependency groups in the
# requirements, so we need to use the extras feature. If adding a new test
# dependency REMEMBER TO ADD an entry on [tool.poetry.extras]
bandit = {version = "1.7.0", optional = true}
coverage = {version = "5.5", optional = true}
flake8 = {version = "3.9.2", optional = true}
flake8_formatter_junit_xml = {version = "0.0.6", optional = true}
pylint = {version = "2.8.3", optional = true}
pylint_junit = {version = "0.3.2", optional = true}
pytest = {version = "6.2.5", optional = true}
pytest-cov = {version = "2.12.1", optional = true}
pytest-factoryboy = {version = "2.1.0", optional = true}
pytest-flask = {version = "1.2.0", optional = true}
pytest-flask-sqlalchemy = {version = "1.0.2", optional = true}
pytest-html = {version = "3.1.1", optional = true}
pytest-mock = {version = "3.6.1", optional = true}
pytest-test-groups = {version = "1.0.3", optional = true}
pytype = {version = "2021.10.25", optional = true}
safety = {version = "1.10.3", optional = true}
easypost = "^5.1.3"
marshmallow-dataclass = "8.1.0"
ddtrace = "^1.0.0"
blinker = "^1.4"
mapbox = "^0.18.0"
geopy = "^2.2.0"

[tool.poetry.extras]
# Currently, poetry doesn't support dependency groups in the requirements, so we
# need to use the extras feature. Keep an eye on poetry 1.2 that will implement
# this feature
tests = [
  "bandit",
  "coverage",
  "flake8",
  "flake8_formatter_junit_xml",
  "pylint",
  "pylint_junit",
  "pytest",
  "pytest-cov",
  "pytest-factoryboy",
  "pytest-flask",
  "pytest-flask-sqlalchemy",
  "pytest-html",
  "pytest-mock",
  "pytest-test-groups",
  "pytype",
  "safety",
]

[tool.poetry.dev-dependencies]
# Add here the dependencies for local development
autopep8 = "1.5.7"
flask-shell-ptpython = "1.0.2"
honcho = "1.1.0"
ipython = "7.20.0"
pip-check-reqs = "2.1.1"
prompt-toolkit = "3.0.21"
pyspellchecker = "0.6.2"
pytest-watch = "4.2.0"
setuptools = "51.0.0"
wheel = "0.36.2"

[build-system]
build-backend = "poetry.core.masonry.api"
requires = ["poetry-core>=1.0.0"]

Solution

  • A multi-line string is not valid for the description field. The error message does not match '^[^\n]*$' is telling you that it is not valid for the value to contain any newline characters.