-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
RuntimeError #3026
Comments
Unable to reproduce this issue. $ docker run --rm -i --entrypoint bash python:3.8 <<EOF
> python -m pip install -q poetry==1.1.0
> git clone --recurse-submodules https://gitlab.com/ViDA-NYU/datamart/datamart.git
> pushd datamart
> python -m poetry install
> EOF
Cloning into 'datamart'...
Submodule 'lib_geo' (https://gitlab.com/ViDA-NYU/datamart/datamart-geo.git) registered for path 'lib_geo'
Cloning into '/datamart/lib_geo'...
Submodule path 'lib_geo': checked out '30bd3db65dd9749261bbfffe04040e2632d6446b'
/datamart /
Creating virtualenv datamart-3NPA7JLM-py3.8 in /root/.cache/pypoetry/virtualenvs
Installing dependencies from lock file
Package operations: 76 installs, 0 updates, 0 removals
• Installing six (1.15.0)
• Installing idna (2.10)
• Installing multidict (4.7.6)
• Installing numpy (1.19.0)
• Installing python-dateutil (2.8.1)
• Installing pytz (2020.1)
• Installing certifi (2020.6.20)
• Installing chardet (3.0.4)
• Installing grpcio (1.30.0)
• Installing joblib (0.16.0)
• Installing pamqp (2.3.0)
• Installing pandas (1.0.5)
• Installing scipy (1.5.1)
• Installing protobuf (3.12.2)
• Installing urllib3 (1.25.9)
• Installing threadpoolctl (2.1.0)
• Installing yarl (1.4.2)
Connection pool is full, discarding connection: pypi.org
• Installing aiormq (3.2.2)
• Installing datamart-geo (0.1 /datamart/lib_geo)
• Installing lazo-index-service (0.5.1)
• Installing markupsafe (1.1.1)
• Installing prometheus-client (0.8.0)
• Installing pyparsing (2.4.7)
• Installing pyreadstat (1.0.0)
• Installing regex (2020.7.14)
• Installing requests (2.24.0)
• Installing scikit-learn (0.23.1)
• Installing wrapt (1.12.1)
• Installing xlrd (1.2.0)
Connection pool is full, discarding connection: pypi.org
• Installing aio-pika (6.6.1)
• Installing alabaster (0.7.12)
• Installing babel (2.8.0)
• Installing datamart-materialize (0.7.1 /datamart/lib_materialize)
• Installing datamart-profiler (0.7.1 /datamart/lib_profiler)
• Installing docutils (0.16)
• Installing elasticsearch (7.8.1)
• Installing imagesize (1.2.0)
• Installing jinja2 (2.11.2)
• Installing packaging (20.4)
• Installing pygments (2.6.1)
• Installing prometheus-async (19.2.0)
• Installing sentry-sdk (0.17.4)
• Installing snowballstemmer (2.0.0)
• Installing sphinxcontrib-applehelp (1.0.2)
• Installing sphinxcontrib-devhelp (1.0.2)
• Installing sphinxcontrib-htmlhelp (1.0.3)
• Installing sphinxcontrib-jsmath (1.0.1)
• Installing sphinxcontrib-qthelp (1.0.3)
• Installing sphinxcontrib-serializinghtml (1.1.4)
• Installing webencodings (0.5.1)
• Installing attrs (19.3.0)
• Installing bleach (3.1.5)
• Installing datamart-augmentation (0.7.1 /datamart/lib_augmentation)
• Installing datamart-core (0.0 /datamart/lib_core)
• Installing defusedxml (0.6.0)
• Installing mccabe (0.6.1)
• Installing pycodestyle (2.6.0)
• Installing pyflakes (2.2.0)
• Installing pyrsistent (0.16.0)
• Installing pyyaml (5.3.1)
• Installing redis (3.5.3)
• Installing sodapy (2.1.0)
• Installing sphinx (3.1.2)
• Installing stringdist (1.0.9)
• Installing tornado (6.0.4)
• Installing coverage (5.2)
• Installing datamart-api-service (0.0 /datamart/apiserver)
• Installing datamart-coordinator-service (0.0 /datamart/coordinator)
• Installing datamart-noaa-discovery-service (0.0 /datamart/discovery/noaa)
• Installing datamart-profiler-service (0.0 /datamart/profiler)
• Installing datamart-zenodo-discovery-service (0.0 /datamart/discovery/zenodo)
• Installing flake8 (3.8.3)
• Installing datamart-socrata-discovery-service (0.0 /datamart/discovery/socrata)
• Installing jsonschema (3.2.0)
• Installing sphinx-rtd-theme (0.5.0)
• Installing readme-renderer (26.0) |
Yeah I am unable to reproduce it in Docker either, even on Python 3.8. However it happens consistently on my laptop. I even reinstalled Poetry. What kind of information would help troubleshooting this? This is not blocking for me since I have to use |
Ubuntu distros typically do have issues with |
IIRC, ubuntu image comes with a non-standard installation of distutils. That is more a distro isssue that anything to do with poetry. As for information, from what I can tell the issue reported has to do with an exception happening within a context manager, we could harden the handling but the root issue will still persist. |
Re-did the whole thing on fresh Ubuntu 20.04, making sure to not install python3 but python2.7. Then installing python3 (which my project needs) once Poetry is set up. I get warnings when running Poetry, and still can't install:
|
|
Not finding python3 seems to be the same distutils issue, using poetry env with a full path to the Python binary still fails. |
Seems those issues were related! I found a problem in the implementation of a context manager and filed #3031. It will fix the RuntimeError, but not the distutils issues. |
Fixes python-poetry#3026 If the context wrapped by the temporary_directory() context manager raised ImportError (for example because distutils.util cannot be imported, python-poetry#721 python-poetry#1837), it would previously keep going, causing a RuntimeError from contextlib: RuntimeError: generator didn't stop after throw()
Fixes #3026 If the context wrapped by the temporary_directory() context manager raised ImportError (for example because distutils.util cannot be imported, #721 #1837), it would previously keep going, causing a RuntimeError from contextlib: RuntimeError: generator didn't stop after throw() Co-authored-by: Remi Rampin <[email protected]>
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I am on the latest Poetry version.
I have searched the issues of this repo and believe that this is not a duplicate.
If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option).OS version and name: Ubuntu Linux 20.04.1
Poetry version: 1.1.0
Link of a Gist with the contents of your pyproject.toml file: https://gitlab.com/ViDA-NYU/datamart/datamart/-/blob/1f15e3db009837cb51ee22274ce9bf3b96e205d7/pyproject.toml
Issue
Since the update, running
poetry install
crashes with aRuntimeError
.poetry install -vvv
The text was updated successfully, but these errors were encountered: