akamhy / waybackpy

Wayback Machine API interface & a command-line tool
https://pypi.org/project/waybackpy/
MIT License
453 stars 32 forks source link

ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+ #186

Open pushkarsingh32 opened 1 year ago

pushkarsingh32 commented 1 year ago

Tried the simple implementation but gives error

from waybackpy import WaybackMachineSaveAPI

url = "google.com/"

user_agent = "Mozilla/5.0 (Windows NT 5.1; rv:40.0) Gecko/20100101 Firefox/40.0"
save_api = WaybackMachineSaveAPI(url, user_agent)

save_api.save()

save_api.timestamp()

This is the error

ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with LibreSSL 2.8.3. See: https://github.com/urllib3/urllib3/issues/2168

mjwat commented 1 year ago

I guess you should check version of urllib3 lib in your project. I just download 1.2.6 instead of 2.0.2 and it works for me

newbie405 commented 1 year ago

I searched up urllib3 v.1.2.6 and there seems to only be 1.2 - 1.2.2. I'm a newbie so please forgive me if I'm wrong. I'm doing a python tutorial that requires urllib and requests and it seems that I have also ran into the same problem, I tried to upgrade openssl, I tried downgrading urllib and I also tried to downgrade requests but none of them seem to work.