Closed shaohaiyang closed 6 months ago
Hey @shaohaiyang 👋
Thank you for reporting the issue. This looks more like a pydantic issue.
Can you please paste your code here?
The code just generated using robyn default create.
from robyn import Robyn
from prisma import Prisma
from prisma.models import User
app = Robyn(__file__)
prisma = Prisma(auto_register=True)
@app.startup_handler
async def startup_handler() -> None:
await prisma.connect()
@app.shutdown_handler
async def shutdown_handler() -> None:
if prisma.is_connected():
await prisma.disconnect()
@app.get("/")
async def h():
user = await User.prisma().create(
data={
"name": "Robert",
},
)
return user.json(indent=2)
if __name__ == "__main__":
app.start(host="0.0.0.0", port=8080)
@shaohaiyang , were you able to fix this issue?
Bug Description
when use :
python3 -m robyn --create
the demo code running report:
Steps to Reproduce
No response
Your operating system
Linux
Your Python version (
python --version
)3.11
Your Robyn version
latest
Additional Info
Should be specify a pydantic version in the requirement.txt to work
pydantic==1.10.11