Skip to content
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

'WSGIRequest' object has no attribute '_resource_closers' when trying to run example #520

Closed
sapkus opened this issue Jan 8, 2021 · 4 comments

Comments

@sapkus
Copy link

sapkus commented Jan 8, 2021

I am trying to run example with docker-compose.
python manage.py run 0.0.0.0:8088 server is running 404 is working, but when trying access tenant: test.localhost:8088 I get django error, wich looks like has to do something with middelaware.

Django version 3.1.3, using settings 'tenant_tutorial.settings'
Starting development server at http://0.0.0.0:8088/
Quit the server with CONTROL-C.
Traceback (most recent call last):
File "/usr/local/lib/python3.8/wsgiref/handlers.py", line 137, in run
self.result = application(self.environ, self.start_response)
File "/usr/local/lib/python3.8/site-packages/django/contrib/staticfiles/handlers.py", line 76, in call
return self.application(environ, start_response)
File "/usr/local/lib/python3.8/site-packages/django/core/handlers/wsgi.py", line 133, in call
response = self.get_response(request)
File "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py", line 129, in get_response
response._resource_closers.append(request.close)
AttributeError: 'WSGIRequest' object has no attribute '_resource_closers'

I tried to downgrade to Django 2.2.12, got similar, but a bit different error:
Django version 2.2.12, using settings 'tenant_tutorial.settings'
Starting development server at http://0.0.0.0:8088/
Quit the server with CONTROL-C.
Traceback (most recent call last):
File "/usr/local/lib/python3.8/wsgiref/handlers.py", line 137, in run
self.result = application(self.environ, self.start_response)
File "/usr/local/lib/python3.8/site-packages/django/contrib/staticfiles/handlers.py", line 65, in call
return self.application(environ, start_response)
File "/usr/local/lib/python3.8/site-packages/django/core/handlers/wsgi.py", line 141, in call
response = self.get_response(request)
File "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py", line 76, in get_response
response._closable_objects.append(request)
AttributeError: 'WSGIRequest' object has no attribute '_closable_objects'

Tried with python3.8 - same. Also tried donwgrade gunicorn to 19.10 same.

@ericdaniel
Copy link

I had the same problem check this: #514

@gerald-michael
Copy link

If your using the current dev source code on github. I had the same issue. I solved it by reverting to commit 3936123

@sapkus
Copy link
Author

sapkus commented Jan 11, 2021

I had the same problem check this: #514

This helped. Thank you

@sapkus sapkus closed this as completed Jan 11, 2021
@tomturner tomturner reopened this Apr 6, 2021
@tomturner
Copy link
Member

This is an issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants