profile
viewpoint

Ask questionsshadow file name 'ssl.py' may cause run time error when tring to run the program from source code

image

As you can see in the screenshot in Pycharm, it shows that the ssl has no property named 'CERT_REQUIRED'. But when I looked up the official doc of urlib and pyopenssl. I am sure that it should not be that property doesn't exist.

I reinstall the requirements and openssl plus urlib in the venv still not work. Then I think maybe the shadow name of ssl.py cause the problem. After rename the ssl.py everything went normal.

So I just change the name of ssl.py in the httpie folder and change the import name of ssl in the httpie folder to solve this

httpie/httpie

Answer questions zwh-china

Yes, I turned out to find my environment may cause the issue, I set up an venv and this problem did not appear again. And python -m httpie.__main__ can properly invoke the program.

useful!

Related questions

No questions were found.
source:https://uonfu.com/
Github User Rank List