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

AttributeError: 'HttpResponse' object has no attribute '_headers' #126

Closed
sbds opened this issue Apr 12, 2021 · 22 comments
Closed

AttributeError: 'HttpResponse' object has no attribute '_headers' #126

sbds opened this issue Apr 12, 2021 · 22 comments

Comments

@sbds
Copy link

sbds commented Apr 12, 2021

This statement is producing an error:
logger.debug('Response headers: %s', getattr(response, '_headers'))

In these 2 files:
"...lib64/python3.7/site-packages/revproxy/utils.py", line 127, in set_response_headers
"...lib64/python3.7/site-packages/revproxy/response.py", line 48, in get_django_response

@litghost
Copy link

This was changed a while ago: django/django@bcc2bef

@sbds
Copy link
Author

sbds commented Apr 14, 2021

Oh. It isn't changed in the version installed though PIP.

@litghost
Copy link

Oh. It isn't changed in the version installed though PIP.

Sorry, I'm agreeing with this issue, and the django change is pretty old.

@rollue
Copy link

rollue commented Apr 16, 2021

Experiencing the same issue here

@matteing
Copy link

Same here.

thatsed added a commit to Innovativity/django-revproxy that referenced this issue Apr 19, 2021
* check for `response.headers` attribute, fallback to old interface if missing
* updated tests to expect Django 3.2+ response.headers
* added Django 3.2 with Python 3.8 job in .travis.yml
thatsed added a commit to Innovativity/django-revproxy that referenced this issue Apr 19, 2021
* check for `response.headers` attribute, fallback to old interface if missing
* updated tests to expect Django 3.2+ response.headers
* added Django 3.2 in .travis.yml
thatsed added a commit to Innovativity/django-revproxy that referenced this issue Apr 19, 2021
* check for `response.headers` attribute, fallback to old interface if missing
* updated tests to expect Django 3.2+ response.headers
* added Django 3.2 in .travis.yml
@ak55mm
Copy link

ak55mm commented Jun 9, 2021

Any idea when this will be in master? Everyone who has moved to Django 3.2 will be affected by this.

nrmitchi-bond added a commit to nrmitchi-bond/django-revproxy that referenced this issue Jun 25, 2021
@stolpeo
Copy link

stolpeo commented Jul 1, 2021

Is there an estimate when this will be merged?

@metalshanked
Copy link

any update or estimate on when this will be available on PyPi? Thanks!

@brianmay
Copy link
Collaborator

brianmay commented Sep 2, 2021

I think this project is basically dead, sorry. I was working on it a while back, but no longer working on the project or employer that required it.

Best bet might be to fork it, change the name, and upload the new name to PyPI.

@thatsed
Copy link
Member

thatsed commented Sep 22, 2021

@brianmay what about transferring the project to Jazzband? That would make it easier for everyone involved.

If you're able, please reach out to @seocam about this. There's quite a community around this project, it would fit nicely in the Jazzband collective in my opinion.

If that's off the table for any reason, we will mantain our fork over at https://github.com/Innovativity/django-revproxy for LTS Django releases and we'll provide a new PyPI package to keep the project alive. That would be a backup solution though.

@brianmay
Copy link
Collaborator

Who is Jazzband?

There have been times abandoned projects get transferred to new maintainers, who then abuse the privilege, and introduce malware into new releases. Which means the project is in even worse state then just being abandoned. Wouldn't want to do that here.

Technically this isn't my project, @seocam was maintaining it, until he ran out of time #75 (comment). I was granted full access #75 (comment) to the github project, pypi, and readthedocs (did I miss anything?). Unless anybody raises objections, I think I can make any change in the best interests of this project.

If my understanding of Jazzband is correct, it is probably a good home for this project. Although I have no idea what to do with PyPI and readthedocs access, which probably will also be required.

@thatsed
Copy link
Member

thatsed commented Sep 23, 2021

There have been times abandoned projects get transferred to new maintainers, who then abuse the privilege, and introduce malware into new releases. Which means the project is in even worse state then just being abandoned. Wouldn't want to do that here.

That's unfortunately very true, and part of the reasoning behind Jazzband

Technically this isn't my project, @seocam was maintaining it, until he ran out of time #75 (comment). I was granted full access #75 (comment) to the github project, pypi, and readthedocs (did I miss anything?). Unless anybody raises objections, I think I can make any change in the best interests of this project.

I think, but I may be wrong, only the owner can transfer the repo. That's why I proposed to raise the question to @seocam, sorry it came out that way, I didn't mean to doubt your position!

Although I have no idea what to do with PyPI and readthedocs access, which probably will also be required.

That's something that should be discussed with them later on I think.

Thank you @brianmay for your help with this!

alenavolk pushed a commit to alenavolk/django-revproxy that referenced this issue Feb 8, 2022
* check for `response.headers` attribute, fallback to old interface if missing
* updated tests to expect Django 3.2+ response.headers
* added Django 3.2 in .travis.yml
@dimasanwaraziz
Copy link

Hello, any solution for this case? I still have issue with this

'HttpResponse' object has no attribute '_headers'

@bode135
Copy link

bode135 commented Dec 7, 2022

Same here...

@dimasanwaraziz
Copy link

Please, anyone have solution?

@Germey
Copy link

Germey commented Jan 1, 2023

Same issue

1 similar comment
@bode135
Copy link

bode135 commented Jan 12, 2023

Same issue

@Germey
Copy link

Germey commented Jan 12, 2023

Install the master branch should work

@AnhHoTrungDev
Copy link

AnhHoTrungDev commented Jan 23, 2023

Same issue on mac 14 m1, Django version 4.0.7, any idea...
image

@JPereira-FJB
Copy link

Same issue, some solution?

@studio-salamander
Copy link

@JPereira-FJB
"Install the master branch should work" (c) @Germey

@andruten
Copy link
Member

andruten commented May 11, 2023

We are waiting the 0.11.0 release but, in the meantime, you can try this: jazzband/help#330 (comment)

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

Successfully merging a pull request may close this issue.