-
-
Notifications
You must be signed in to change notification settings - Fork 744
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
embedded request breaking with TypeError: unhashable type: 'dict'
#1394
Comments
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
I am running into this same issue currently. Was there ever a determined cause? I am running these versions: Cerberus==1.3.2 in the Docker image python:3.9.4. This has been working fine previously. Here's the call stack: Traceback (most recent call last): |
The cause of this error is a documented limitation of Embedded documents with Eve. See documentation: https://docs.python-eve.org/en/stable/features.html#limitations Limitations Currently we support embedding of documents by references located in any subdocuments (nested dicts and lists). For example, a query /invoices/?embedded={"user.friends":1} will return a document with user and all his friends embedded, but only if user is a subdocument and friends is a list of reference (it could be a list of dicts, nested dict, etc.). This feature is about serialization on GET requests. There’s no support for POST, PUT or PATCH of embedded documents. |
Eve-1.1.5 Traceback (most recent call last): I am also facing same issue. Temporary Solution: |
This issue tracker is a tool to address bugs in Eve itself.
Please use Stack Overflow for general questions about using Eve or issues not
related to Eve (see http://python-eve.org/support).
If you'd like to report a bug in Eve, fill out the template below. Provide
any any extra information that may be useful / related to your problem.
Ideally, create an MCVE, which helps us
understand the problem and helps check that it is not caused by something in
your code.
Expected Behavior
I have created 3 shemas with some embedded fields.
When i use the following request, I expect to have all my data returned.
Actual Behavior
Eve return a 500 error and print the following traceback in the console:
after some debug print, it seems that in the embeddement process of one of the articles object, the resources given to
embedded_document
is a Dict insted of the ObjectIdTo be precise, this Dict is the object to embed as it in the data base.
As if the already embedded document tried to re-embed itselft.
Environment
The text was updated successfully, but these errors were encountered: