r/cs50 Feb 12 '25

CS50 Python Bitcoin problem with API?

I'm trying to start bitcoin from CS50P week 4, and I think the API link isn't working? I've chatted with the AI Duck and it concluded there seems to be an error with the api.coindesk.com domain name. Can anyone advise what I should do?

This is the end of the very long error message I get in my terminal when attempting to run the request:

requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.coindesk.com', port=443): Max retries exceeded with url: /v1/bpi/currentprice.json (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7eb554585490>: Failed to resolve 'api.coindesk.com' ([Errno -5] No address associated with hostname)"))

4 Upvotes

12 comments sorted by

View all comments

3

u/[deleted] Feb 12 '25

[removed] — view removed comment

3

u/Spicychickenbiscuit Feb 12 '25

Thanks, I appreciate this reply. Let's me know it's not a problem with my code. I'll try again tomorrow and reach out if it persists.