Help Needed with Python Project: Bitcoin Price Notifications – Issue with urllib3 and OpenSSL
Hi everyone,
I’m a beginner (3 months into Python) working on a Bitcoin Price Notification Project inspired by this tutorial: Python Bitcoin Price Notifications.
I’m using VSCode on a Mac to write and run the code, and I created the virtual environment directly in VSCode.
Here’s the code I’m using:
python
Copy code
import requests
import time
from datetime import datetime
BITCOIN_PRICE_THRESHOLD = 10000
BITCOIN_API_URL = ‘https://pro-api.coinmarketcap.com/v1/cryptocurrency/quotes/latest‘
IFTTT_WEBHOOKS_URL = ‘https://maker.ifttt.com/trigger/{}/with/key/64595467-5bcd-4118-83e6-e9d1dbcfb3f0‘
HEADERS = {‘X-CMC_PRO_API_KEY’: ‘64595467-5bcd-4118-83e6-e9d1dbcfb3f0’}
# Functions and main logic below (full code available if needed)
When I try running the script, I get this warning:
bash
Copy code
(.venv) essaiencarnacionrosa@Essais-Mac-mini Bitcon Notification App % “/Users/essaiencarnacionrosa/Documents/VS 2024/Bitcon Notification App/.venv/bin/python” “/Users/essaiencarnacionrosa/Documents/VS 2024/Bitcon Notification App/bitcoin_notifications.py”
/Users/essaiencarnacionrosa/Documents/VS 2024/Bitcon Notification App/.venv/lib/python3.9/site-packages/urllib3/__init__.py:35: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the ‘ssl’ module is compiled with ‘LibreSSL 2.8.3’. See: https://github.com/urllib3/urllib3/issues/3020
warnings.warn(
Steps I’ve Tried:
Updated OpenSSL via Homebrew:
bash
Copy code
brew install openssl
brew link openssl
Verified the version of OpenSSL installed:
Copy code
openssl version
Output: OpenSSL 1.1.1+ (so it’s up to date).
Googled and found suggestions to:
Ignore warnings (not ideal, and I’d like to fix it properly).
Ensure my virtual environment is using the correct OpenSSL version.
Despite these steps, the issue persists. I suspect my Python virtual environment (venv) is still using the wrong SSL library.
Additional Info:
Environment: Python 3.9 on macOS, using VSCode.
Virtual Environment: Created in VSCode.
APIs: IFTTT and CoinMarketCap APIs are set up and tested successfully.
My main goal is to get this script working without the SSL issue, but I’m open to advice about best practices for handling warnings like these.
If you’ve faced similar issues or have advice on configuring Python to use the correct SSL library in a venv, I’d really appreciate your help!
Thanks in advance! 🙏
submitted by /u/godsfavoritepet
[link] [comments]
r/learnpython Help Needed with Python Project: Bitcoin Price Notifications – Issue with urllib3 and OpenSSL Hi everyone, I’m a beginner (3 months into Python) working on a Bitcoin Price Notification Project inspired by this tutorial: Python Bitcoin Price Notifications. I’m using VSCode on a Mac to write and run the code, and I created the virtual environment directly in VSCode. Here’s the code I’m using: python Copy code import requests import time from datetime import datetime BITCOIN_PRICE_THRESHOLD = 10000 BITCOIN_API_URL = ‘https://pro-api.coinmarketcap.com/v1/cryptocurrency/quotes/latest’ IFTTT_WEBHOOKS_URL = ‘https://maker.ifttt.com/trigger/{}/with/key/64595467-5bcd-4118-83e6-e9d1dbcfb3f0’ HEADERS = {‘X-CMC_PRO_API_KEY’: ‘64595467-5bcd-4118-83e6-e9d1dbcfb3f0’} # Functions and main logic below (full code available if needed) When I try running the script, I get this warning: bash Copy code (.venv) essaiencarnacionrosa@Essais-Mac-mini Bitcon Notification App % “/Users/essaiencarnacionrosa/Documents/VS 2024/Bitcon Notification App/.venv/bin/python” “/Users/essaiencarnacionrosa/Documents/VS 2024/Bitcon Notification App/bitcoin_notifications.py” /Users/essaiencarnacionrosa/Documents/VS 2024/Bitcon Notification App/.venv/lib/python3.9/site-packages/urllib3/__init__.py:35: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the ‘ssl’ module is compiled with ‘LibreSSL 2.8.3’. See: https://github.com/urllib3/urllib3/issues/3020 warnings.warn( Steps I’ve Tried: Updated OpenSSL via Homebrew: bash Copy code brew install openssl brew link openssl Verified the version of OpenSSL installed: Copy code openssl version Output: OpenSSL 1.1.1+ (so it’s up to date). Googled and found suggestions to: Ignore warnings (not ideal, and I’d like to fix it properly). Ensure my virtual environment is using the correct OpenSSL version. Despite these steps, the issue persists. I suspect my Python virtual environment (venv) is still using the wrong SSL library. Additional Info: Environment: Python 3.9 on macOS, using VSCode. Virtual Environment: Created in VSCode. APIs: IFTTT and CoinMarketCap APIs are set up and tested successfully. My main goal is to get this script working without the SSL issue, but I’m open to advice about best practices for handling warnings like these. If you’ve faced similar issues or have advice on configuring Python to use the correct SSL library in a venv, I’d really appreciate your help! Thanks in advance! 🙏 submitted by /u/godsfavoritepet [link] [comments]
Help Needed with Python Project: Bitcoin Price Notifications – Issue with urllib3 and OpenSSL
Hi everyone,
I’m a beginner (3 months into Python) working on a Bitcoin Price Notification Project inspired by this tutorial: Python Bitcoin Price Notifications.
I’m using VSCode on a Mac to write and run the code, and I created the virtual environment directly in VSCode.
Here’s the code I’m using:
python
Copy code
import requests
import time
from datetime import datetime
BITCOIN_PRICE_THRESHOLD = 10000
BITCOIN_API_URL = ‘https://pro-api.coinmarketcap.com/v1/cryptocurrency/quotes/latest‘
IFTTT_WEBHOOKS_URL = ‘https://maker.ifttt.com/trigger/{}/with/key/64595467-5bcd-4118-83e6-e9d1dbcfb3f0‘
HEADERS = {‘X-CMC_PRO_API_KEY’: ‘64595467-5bcd-4118-83e6-e9d1dbcfb3f0’}
# Functions and main logic below (full code available if needed)
When I try running the script, I get this warning:
bash
Copy code
(.venv) essaiencarnacionrosa@Essais-Mac-mini Bitcon Notification App % “/Users/essaiencarnacionrosa/Documents/VS 2024/Bitcon Notification App/.venv/bin/python” “/Users/essaiencarnacionrosa/Documents/VS 2024/Bitcon Notification App/bitcoin_notifications.py”
/Users/essaiencarnacionrosa/Documents/VS 2024/Bitcon Notification App/.venv/lib/python3.9/site-packages/urllib3/__init__.py:35: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the ‘ssl’ module is compiled with ‘LibreSSL 2.8.3’. See: https://github.com/urllib3/urllib3/issues/3020
warnings.warn(
Steps I’ve Tried:
Updated OpenSSL via Homebrew:
bash
Copy code
brew install openssl
brew link openssl
Verified the version of OpenSSL installed:
Copy code
openssl version
Output: OpenSSL 1.1.1+ (so it’s up to date).
Googled and found suggestions to:
Ignore warnings (not ideal, and I’d like to fix it properly).
Ensure my virtual environment is using the correct OpenSSL version.
Despite these steps, the issue persists. I suspect my Python virtual environment (venv) is still using the wrong SSL library.
Additional Info:
Environment: Python 3.9 on macOS, using VSCode.
Virtual Environment: Created in VSCode.
APIs: IFTTT and CoinMarketCap APIs are set up and tested successfully.
My main goal is to get this script working without the SSL issue, but I’m open to advice about best practices for handling warnings like these.
If you’ve faced similar issues or have advice on configuring Python to use the correct SSL library in a venv, I’d really appreciate your help!
Thanks in advance! 🙏
submitted by /u/godsfavoritepet
[link] [comments]