Object of type 'WSGIRequest' is not JSON serializable
See original GitHub issuemy code:
@background(schedule=60)
def g_trends(request):
get_trends()
return HttpResponse('hello')
when i run code in django and i get to my url for that function i get this error: Object of type ‘WSGIRequest’ is not JSON serializable how can i fix it?
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
<Django object > is not JSON serializable - Stack Overflow
simplejson and json don't work with django objects well. Django's built-in serializers can only serialize querysets filled with django objects:
Read more >Object of type QuerySet is not JSON serializable - Django Forum
Hello, I'm trying to display some info from models through views as a list of dictionaries in JSON format but I get the...
Read more >Django object is not JSON serializable | Edureka Community
I have the following code for serializing the queryset; def render_to_response(self, context, ** ... both django objects and dicts.
Read more >Django : TypeError: object is not JSON serializable - YouTube
Django : TypeError: object is not JSON serializable [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] Django ...
Read more >PYTHON : Django object is not JSON serializable - YouTube
PYTHON : Django object is not JSON serializable [ Gift : Animated Search Engine : https://www.hows.tech/p/recommended.html ] PYTHON : Django ...
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 Free
Top 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
@yaserrahimi How did you fix this ?? facing the same .
@gvarela23 maybe this helps: https://github.com/arteria/django-background-tasks/issues/171