This repository was archived by the owner on Apr 15, 2025. It is now read-only.
This repository was archived by the owner on Apr 15, 2025. It is now read-only.
AttributeError: 'NoneType' object has no attribute 'get' #1070
Open
Description
Bug description
Getting an "AttributeError" when batching a transaction.
How to reproduce
- Create a complicated, large batched transaction.
- Result:
Traceback (most recent call last):
File "/app/pwn/pwn_service.py", line 1288, in process_scan
await txb.commit()
File "/usr/local/lib/python3.12/site-packages/prisma/client.py", line 764, in commit
await self.__client._engine.query(
File "/usr/local/lib/python3.12/site-packages/prisma/engine/_query.py", line 402, in query
return await self.request(
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/prisma/engine/_http.py", line 233, in request
return self._process_response_data(data=data, response=response)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/prisma/engine/_http.py", line 87, in _process_response_data
return utils.handle_response_errors(response, errors_data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/prisma/engine/utils.py", line 167, in handle_response_errors
kind = user_facing.get('meta', {}).get('kind')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get'
``
It's clear the code expects the 'meta' to return {} or the current object, but not None, which has apparently been inserted in that tag.
## Expected behavior
No panics.
## Prisma information
Can't share more information on the database schema. Can dm it to a source maintainer if you are here.
Metadata
Metadata
Assignees
Labels
No labels