<InMemoryUploadedFile: logo_Reverse.svg (image/svg+xml)> is not JSON serializable ... but other uploads work fine.
See original GitHub issueI have made file uploads before, and they work. However here i must have found a bug in graphene-file-upload.
{"errors":[{"message":"<InMemoryUploadedFile: Welnity_logo_Reverse.svg (image/svg+xml)> is not JSON serializable"}]}
Issue Analytics
- State:
- Created 4 years ago
- Comments:9
Top Results From Across the Web
Object of type InMemoryUploadedFile is not JSON ...
this error only occurs in mutations that have an upload file and some required field is missing due to mutation input. Graphene throws...
Read more >Object of type InMemoryUploadedFile is not JSON ...
Here I am trying to update data in the bookmark model, But there is an error, related to image fields,. models.py
Read more >Django object is not JSON serializable
I have the following code for serializing the queryset; def render_to_response(self, context, ** ... both django objects and dicts.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Thousif-S I would do following to resolve this issue:
1-Remove the VersatileImageFieldFile from your Mutation. Test it from the graphql view with arguments. Does it work now? 2 Change the VersatileImageFieldFile to ImageField. Test it from the graphql view with arguments. Does it work now?
Unfortunately graphene-file-upload hides the real error, so that makes you think that it’s related to graphene-file-upload, but in the end it was another error that i was not aware of.
In my case it was related to another field expecting different type of argument.
it means that you are not passing an expected input. like in my previous comment shows the actual error is
hidden by graphene-file-upload
in my instance i was missing the position