question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Object of type 'WSGIRequest' is not JSON serializable

See original GitHub issue

my 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:closed
  • Created 5 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
Sudheer312commented, Jul 29, 2019

my 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?

@yaserrahimi How did you fix this ?? facing the same .

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found