RobertCraigie / prisma-client-py

Prisma Client Python is an auto-generated and fully type-safe database client designed for ease of use
https://prisma-client-py.readthedocs.io
Apache License 2.0
1.85k stars 81 forks source link

`prisma db push` does not work #929

Open misogihagi opened 6 months ago

misogihagi commented 6 months ago

Bug description

prisma db push does not work

here is running log.

I don't know what caused it.

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/prisma/engine/query.py", line 207, in spawn
    data = await self.request('GET', '/status')
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/prisma/engine/http.py", line 149, in request
    raise errors.EngineRequestError(resp, await resp.text())
prisma.engine.errors.EngineRequestError: 301: <HTML>
<HEAD><TITLE>Redirection</TITLE></HEAD>
<BODY><H1>Redirect</H1></BODY>

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/work/in.py", line 22, in <module>
    asyncio.run(main())
  File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/work/in.py", line 9, in main
    await db.connect()
  File "/usr/local/lib/python3.11/site-packages/prisma/client.py", line 292, in connect
    await self.__engine.connect(
  File "/usr/local/lib/python3.11/site-packages/prisma/engine/query.py", line 137, in connect
    await self.spawn(file, timeout=timeout, datasources=datasources)
  File "/usr/local/lib/python3.11/site-packages/prisma/engine/query.py", line 230, in spawn
    raise errors.EngineConnectionError(
prisma.engine.errors.EngineConnectionError: Could not connect to the query engine
root@792246b0371b:/work# 

How to reproduce

May be relevant to the corporate environment under proxy.