-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
'HTTPResponse' object has no attribute 'strict' #7936
Comments
this is psf/cachecontrol#292 however since poetry requirements do not allow urllib3 2.0, this shows that you, or whatever you used to install poetry, have upgraded something that you should not have done please close |
PS I do not know why you write here "I do not see this issue on internet." when, as I now see, you have already commented on that other issue |
Poetry has |
Can be the case that you are still using poetry < 1.2; in that case you will need to pin urllib to < 2 because it was a dev dependency as you can see here. |
Good by me if we want to close it. Currently I removed the line with strict in cache control. I tried it on python 3.10, 3.11 with latest poetry and latest pip. I don’t know what did I mess up on my end. Thanks though. |
I surely confirm I am using latest version 1.4.2 in and out(global) of my virtual environment. |
@aakashrshah I am having the same issue (this issue started to happen a couple days ago). |
@chanwutk Not sure about side-effect, but it will work again. |
Hi @chanwutk I deleted line 54 |
Thank you!! |
There was a `'HTTPResponse' object has no attribute 'strict'` error when building poetry inside the docker container; python-poetry/poetry#7936 suggests it is an issue with poetry < 1.2 and not pinning urllib to < 3.
* chore(deps): add analysis dependencies * feat(analysis): add pull request list view * feat(analysis): implemented state distribution * feat(analysis): implemented overall timeline distribution * feat(analysis): implemented author association distribution * feat(analysis): implemented conventional commit breakdown * chore(deps): consolidated * feat(analysis): implemented reaction distribution * docs(sample): add plot and view samples * chore(poetry): update lock * chore(precommit): removed eof fixer * chore(notebooks): moved view pull requests * chore(verify): add papermill and jupyter verification scripts * chore(notebooks): refresh * chore(ci): verify notebooks * chore(ci): build project * chore(pyproject): comment out readme for now * chore(ci): run poetry shell * fix(ci): ensure poetry run is used for validate notebooks * fix(ci): update validate notebooks * chore(verbose): disable validation * chore(ci): add amend * fix(poetry): pin urllib below version 2 python-poetry/poetry#7936 https://github.com/kiran94/prfiesta/actions/runs/5031995017/jobs/9025385196#step:11:26 * chore(ci): restrict verify notebooks to linux * chore(notebooks): refresh * chore(notebooks): remove echo * style(analysis): trailing whitespace
System config:
Working with |
|
Didn't work on mine, unfortunately |
Have you tried to check urllib3 version and if in case of >=2.0 downgrade it via pip and repeat ? |
urllib3 Remove strict parameter 2064 |
Poetry requires urllib3 <2.0. See python-poetry/poetry#7936
Poetry requires urllib3 <2.0. See python-poetry/poetry#7936
Poetry requires urllib3 <2.0. See python-poetry/poetry#7936
Poetry requires urllib3 <2.0. See python-poetry/poetry#7936
Poetry requires urllib3 <2.0. See python-poetry/poetry#7936
Started to get errors in CI during the installation of dependencies, apparently due to incompatibilities between Poetry and urllib3 >=2.0. No idea why urllib3 >=2.0 only started to get installed now, perhaps something changed in GHA's side. Poetry 1.2.0 already requires urllib3 <2.0 thus solving the problem. See python-poetry/poetry#7936
Had this issue seemingly because i've installed my package into the same pyenv environment poetry exists on -- had to manually add the del line in
From there I was able to |
Thank you for the reply, my issue is solved by upgrading my Poetry version to |
Maybe context-specific, but I fixed this by using
Another approach might be to use pipx to run poetry, since it handles isolating the executable in its own venv. |
Downgrading requests worked for me, Is this error related to psf/cachecontrol#301 which was merged yesterday? |
add this reference which provides some guidance for how to migrate from 1.x to 2.x for urllib3 if you pin versions for
everything continues to work |
Turns out, not all responses come with "strict" key. I had to add the following in
|
In my case, I started getting this error after something I did with pipx (can't tell really what happened). Running |
Just always pin these dependencies for poetry and you should be good.
Just downgrade urllib3 with pip in case you broke poetry. |
Running this worked for me: |
I had the same issue, and I fix it by deleting the terminal I was running it from and rerun it in another terminal. hope that helps |
I've deleted all poetry virtual environments and created a new virtual environment again, and the problem was resolved. |
For me, I had moved my folder with
still not sure why. but when i moved it back to |
I had the same problem when installing In short deactivate # deactivate virtual env (if activated)
pip3 install --upgrade pip
pip3 install --upgrade urllib3 requests |
I was about to fork Poetry and create a PR that adds the |
Yes, there reason is that this bug is not present in Poetry anymore. This is only a case for non-standard installation which are discouraged. |
Oh, thx! There must've been something nonstandard about my environment because I used mamba/conda for another project. But now I'm running into #8679 instead of this one. ^.^ |
To above all, why not check That's because I forgot to upgrade the most important poetry-1.4.1, and that version require urllib3<2.0.0,>=1.26.0 But now the latest version of poetry is 1.8.1, and everythings work fluently, don't need to manually edit any link in site-packages. Now what about try to upgrade those 3 package all? ♥ |
@LaoshuBaby Have you tried upgrading |
I did not specify a venv environment |
Can you try upgrading both pip and poetry pip install --upgrade pip poetry |
I execute this command and upgrade everything to the latest, which can solve the problem originally raised by this issue.
You can do it without upgrading pip, but it will not cause problems if you upgrade it according to my test. (In short, now my pip, requests, urllib3, and poetry are all up to date.) That's why I recommend you upgrade(if you can) them. |
As @jeromegit wrote earlier, this is surely due to using Poetry 1.4.
Poetry 1.4 is installed, by the same time downgrading pip install poetry |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
-vvv
option) and have included the output below.Issue
I am not able to install or add packages and blocked significantly. I do not see this issue on internet. Am i using a wrong python version? this is the latest version of poetry , shall i revert?
The text was updated successfully, but these errors were encountered: