Hi guys,
So I have a python web service running quite alright except when I need it to use prisma to connect to a PG db. Here is the error log I get:
Expected /opt/render/project/src/prisma-query-engine-debian-openssl-1.1.x, /opt/render/.cache/prisma-python/binaries/4.15.0/8fbc245156db7124f997f4cecdd8d1219e360944/prisma-query-engine-debian-openssl-1.1.x or /opt/render/.cache/prisma-python/binaries/4.15.0/8fbc245156db7124f997f4cecdd8d1219e360944/node_modules/prisma/query-engine-debian-openssl-1.1.x to exist but none were found or could not be executed. Try running prisma py fetch
And my build command is:
pip install -r requirements.txt && pip install engines-0.4.0-cp38-cp38-linux_x86_64.whl && prisma py generate && prisma py fetch
The build log shows that prisma (0.10.0) has been installed, the prisma client has been generated, and the prisma binaries have been added. So… what could be the issue?
Build Logs
Oct 4 05:27:50 PM Successfully installed MarkupSafe-2.1.3 anyio-4.0.0 astunparse-1.6.3 certifi-2023.7.22 cffi-1.16.0 charset-normalizer-3.3.0 click-8.1.7 cryptography-41.0.2 exceptiongroup-1.1.3 fastapi-0.97.0 graphql-core-3.2.3 gunicorn-21.2.0 h11-0.14.0 httpcore-0.18.0 httpx-0.25.0 idna-3.4 jinja2-3.1.2 maturin-1.2.3 minecart-0.3.0 nodeenv-1.8.0 orjson-3.9.6 packaging-23.2 pdfminer3k-1.3.4 ply-3.11 prisma-0.10.0 pycparser-2.21 pydantic-1.10.13 pypdf-3.11.0 python-dateutil-2.8.2 python-dotenv-1.0.0 pytz-2023.3 qolpy-0.1.2 requests-2.31.0 six-1.16.0 sniffio-1.3.0 starlette-0.27.0 strawberry-graphql-0.199.0 tomli-2.0.1 tomlkit-0.12.1 typing-3.7.4.3 typing-extensions-4.8.0 urllib3-2.0.6 uvicorn-0.22.0 websockets-11.0.3 wheel-0.41.2
Oct 4 05:27:50 PM WARNING: You are using pip version 21.1.1; however, version 23.2.1 is available.
Oct 4 05:27:50 PM You should consider upgrading via the '/opt/render/project/src/.venv/bin/python3.8 -m pip install --upgrade pip' command.
Oct 4 05:27:51 PM Processing ./engines-0.4.0-cp38-cp38-linux_x86_64.whl
Oct 4 05:27:51 PM Installing collected packages: engines
Oct 4 05:27:51 PM Successfully installed engines-0.4.0
Oct 4 05:27:51 PM WARNING: You are using pip version 21.1.1; however, version 23.2.1 is available.
Oct 4 05:27:51 PM You should consider upgrading via the '/opt/render/project/src/.venv/bin/python3.8 -m pip install --upgrade pip' command.
Oct 4 05:27:51 PM WARNING: Unsupported version of pydantic installed, this command may not work as intended
Oct 4 05:27:51 PM Please update pydantic to 1.8 or greater.
Oct 4 05:27:51 PM
Oct 4 05:27:52 PM Prisma schema loaded from prisma/schema.prisma
Oct 4 05:27:52 PM
Oct 4 05:27:52 PM Some types are disabled by default due to being incompatible with Mypy, it is highly recommended
Oct 4 05:27:52 PM to use Pyright instead and configure Prisma Python to use recursive types. To re-enable certain types:
Oct 4 05:27:52 PM
Oct 4 05:27:52 PM generator client {
Oct 4 05:27:52 PM provider = "prisma-client-py"
Oct 4 05:27:52 PM recursive_type_depth = -1
Oct 4 05:27:52 PM }
Oct 4 05:27:52 PM
Oct 4 05:27:52 PM If you need to use Mypy, you can also disable this message by explicitly setting the default value:
Oct 4 05:27:52 PM
Oct 4 05:27:52 PM generator client {
Oct 4 05:27:52 PM provider = "prisma-client-py"
Oct 4 05:27:52 PM recursive_type_depth = 5
Oct 4 05:27:52 PM }
Oct 4 05:27:52 PM
Oct 4 05:27:52 PM For more information see: https://prisma-client-py.readthedocs.io/en/stable/reference/limitations/#default-type-limitations
Oct 4 05:27:52 PM
Oct 4 05:27:52 PM
Oct 4 05:27:52 PM
Oct 4 05:27:52 PM ✔ Generated Prisma Client Python (v0.10.0) to ./.venv/lib/python3.8/site-packages/prisma in 231ms
Oct 4 05:27:52 PM
Oct 4 05:27:53 PM Downloaded binaries to /opt/render/.cache/prisma-python/binaries/4.15.0/8fbc245156db7124f997f4cecdd8d1219e360944
Other Relevant Details
Python Version: 3.8.10
Node Version: 18.16.0