Random build failures due to Python dependencies

We are seeing sporadic build failures that appear to be related to installing Python dependencies. Retrying the build usually works.

These happen every few days and the specific dependency that fails is random.

Here is an example:

Apr 22 04:28:45 PM   ==> Running build command './backend/build.sh'...
Apr 22 04:28:46 PM   Requirement already satisfied: pip in /opt/render/project/src/.venv/lib/python3.10/site-packages (21.2.4)
Apr 22 04:28:46 PM   Collecting pip
Apr 22 04:28:46 PM     Using cached pip-22.0.4-py3-none-any.whl (2.1 MB)
Apr 22 04:28:46 PM   Installing collected packages: pip
Apr 22 04:28:46 PM     Attempting uninstall: pip
Apr 22 04:28:46 PM       Found existing installation: pip 21.2.4
Apr 22 04:28:47 PM       Uninstalling pip-21.2.4:
Apr 22 04:28:47 PM         Successfully uninstalled pip-21.2.4
Apr 22 04:28:49 PM   Successfully installed pip-22.0.4
Apr 22 04:28:51 PM   Installing dependencies from lock file
Apr 22 04:28:54 PM  
Apr 22 04:28:54 PM   Package operations: 110 installs, 0 updates, 0 removals
Apr 22 04:28:54 PM  
Apr 22 04:28:54 PM     • Installing pyasn1 (0.4.8)
Apr 22 04:28:55 PM     • Installing cachetools (5.0.0)
Apr 22 04:28:56 PM     • Installing certifi (2021.10.8)
Apr 22 04:28:56 PM     • Installing charset-normalizer (2.0.12)
Apr 22 04:28:56 PM     • Installing graphql-core (3.1.7)
Apr 22 04:28:56 PM     • Installing protobuf (3.20.0)
Apr 22 04:28:56 PM     • Installing pyasn1-modules (0.2.8)
Apr 22 04:28:56 PM     • Installing idna (3.3)
Apr 22 04:28:56 PM     • Installing rsa (4.8)
Apr 22 04:28:56 PM     • Installing six (1.16.0)
Apr 22 04:28:56 PM     • Installing urllib3 (1.26.9)
Apr 22 04:29:03 PM     • Installing aniso8601 (9.0.1)
Apr 22 04:29:03 PM     • Installing asgiref (3.5.0)
Apr 22 04:29:03 PM     • Installing google-auth (2.6.2)
Apr 22 04:29:03 PM     • Installing googleapis-common-protos (1.56.0)
Apr 22 04:29:03 PM     • Installing graphql-relay (3.1.5)
Apr 22 04:29:03 PM     • Installing requests (2.27.1)
Apr 22 04:29:03 PM     • Installing sqlparse (0.4.2)
Apr 22 04:29:03 PM     • Installing pytz (2022.1)
Apr 22 04:29:09 PM     • Installing babel (2.9.1)
Apr 22 04:29:09 PM     • Installing django (4.0.3)
Apr 22 04:29:09 PM     • Installing google-api-core (2.7.1)
Apr 22 04:29:09 PM     • Installing google-crc32c (1.3.0)
Apr 22 04:29:09 PM     • Installing graphene (3.0)
Apr 22 04:29:09 PM     • Installing mypy-extensions (0.4.3)
Apr 22 04:29:09 PM     • Installing promise (2.3)
Apr 22 04:29:09 PM     • Installing python-http-client (3.3.7)
Apr 22 04:29:09 PM     • Installing starkbank-ecdsa (2.0.3)
Apr 22 04:29:09 PM     • Installing text-unidecode (1.3)
Apr 22 04:29:09 PM     • Installing pyparsing (3.0.8)
Apr 22 04:29:09 PM     • Installing pillow (9.1.0)
Apr 22 04:29:16 PM     • Installing tomli (2.0.1)
Apr 22 04:29:16 PM     • Installing typing-extensions (4.1.1)
Apr 22 04:29:23 PM     • Installing attrs (21.4.0)
Apr 22 04:29:23 PM     • Installing brotli (1.0.9)
Apr 22 04:29:23 PM     • Installing click (8.1.2)
Apr 22 04:29:23 PM     • Installing django-flat-responsive (2.0)
Apr 22 04:29:23 PM     • Installing django-colorfield (0.6.3)
Apr 22 04:29:23 PM     • Installing djangorestframework (3.13.1)
Apr 22 04:29:23 PM     • Installing future (0.18.2)
Apr 22 04:29:23 PM     • Installing django-stubs-ext (0.4.0)
Apr 22 04:29:23 PM     • Installing google-cloud-core (2.2.3)
Apr 22 04:29:23 PM     • Installing graphene-django (3.0.0b7 0bb9f1c)
Apr 22 04:29:23 PM     • Installing google-resumable-media (2.3.2)
Apr 22 04:29:23 PM     • Installing django-flat-theme (1.1.4)
Apr 22 04:29:28 PM     • Installing jsonfield (3.1.0)
Apr 22 04:29:30 PM     • Installing markdown (3.3.6)
Apr 22 04:29:31 PM     • Installing mypy (0.942)
Apr 22 04:29:31 PM     • Installing numpy (1.22.3)
Apr 22 04:29:32 PM     • Installing orderedmultidict (1.0.1)
Apr 22 04:29:33 PM     • Installing packaging (21.3)
Apr 22 04:29:34 PM  
Apr 22 04:29:34 PM     EnvCommandError
Apr 22 04:29:34 PM  
Apr 22 04:29:34 PM     Command ['/opt/render/project/src/.venv/bin/pip', 'install', '--no-deps', 'file:///opt/render/.cache/.python-poetry/cache/artifacts/50/6d/82/7b00ab83773d43f0bf1627d032f35bd297384677925f739bbc765a91cd/mypy-0.942-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl'] errored with the following return code -7, and output:
Apr 22 04:29:34 PM  
Apr 22 04:29:34 PM  
Apr 22 04:29:34 PM     at /home/render/.python-poetry/venv/lib/python3.7/site-packages/poetry/utils/env.py:1183 in _run
Apr 22 04:29:35 PM         1179│                 output = subprocess.check_output(
Apr 22 04:29:35 PM         1180│                     cmd, stderr=subprocess.STDOUT, **kwargs
Apr 22 04:29:35 PM         1181│                 )
Apr 22 04:29:35 PM         1182│         except CalledProcessError as e:
Apr 22 04:29:35 PM       → 1183│             raise EnvCommandError(e, input=input_)
Apr 22 04:29:35 PM         1184│
Apr 22 04:29:35 PM         1185│         return decode(output)
Apr 22 04:29:35 PM         1186│
Apr 22 04:29:35 PM         1187│     def execute(self, bin, *args, **kwargs):
Apr 22 04:29:35 PM  
Apr 22 04:29:35 PM     • Installing pathspec (0.9.0)
Apr 22 04:29:35 PM     • Installing platformdirs (2.5.1)
Apr 22 04:29:35 PM     • Installing py-moneyed (1.2)
Apr 22 04:29:35 PM     • Installing pycodestyle (2.8.0)
Apr 22 04:29:35 PM     • Installing pyjwt (2.3.0)
Apr 22 04:29:36 PM     • Installing python-dateutil (2.8.2)
Apr 22 04:29:39 PM     • Installing python-stdnum (1.17)
Apr 22 04:29:40 PM     • Installing sendgrid (6.9.7)
Apr 22 04:29:42 PM     • Installing stripe (2.70.0)
Apr 22 04:29:43 PM     • Installing tenacity (8.0.1)
Apr 22 04:29:43 PM     • Installing toml (0.10.2)
Apr 22 04:29:43 PM     • Installing types-pytz (2021.3.6)
Apr 22 04:29:44 PM     • Installing types-pyyaml (6.0.5)
Apr 22 04:29:44 PM     • Installing wcwidth (0.2.5)
Apr 22 04:29:53 PM   ==> Build failed 😞

I have stared at this inscrutable error message for a long time but I have no idea what the actual error is.

Any idea what is going on here? Or how we may prevent these failures?

Hi @pifantastic,

Happy to take a closer look here - do you mind DMing me the email associated with your Render account and service?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.