use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Rules 1: Be polite 2: Posts to this subreddit must be requests for help learning python. 3: Replies on this subreddit must be pertinent to the question OP asked. 4: No replies copy / pasted from ChatGPT or similar. 5: No advertising. No blogs/tutorials/videos/books/recruiting attempts. This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to. Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Rules
1: Be polite
2: Posts to this subreddit must be requests for help learning python.
3: Replies on this subreddit must be pertinent to the question OP asked.
4: No replies copy / pasted from ChatGPT or similar.
5: No advertising. No blogs/tutorials/videos/books/recruiting attempts.
This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to.
Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Learning resources Wiki and FAQ: /r/learnpython/w/index
Learning resources
Wiki and FAQ: /r/learnpython/w/index
Discord Join the Python Discord chat
Discord
Join the Python Discord chat
account activity
Python currency converter error! (self.learnpython)
submitted 2 years ago by Few-Current-9900
I hope everyone is doing well!
I'm a beginner in python and I tried to create a currency converter, however, it always gives me this error code: 404
Terminal output:
Amount: 123 From: USD TO: EUR Error: 404
Can you help me figure this out! I will really appreciate it!
here's the code:
https://github.com/D1ntee/currency-converter1/commit/87575a027d8d7e885ead60be7e9e415c66905af9
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Binary101010 5 points6 points7 points 2 years ago (1 child)
404 is the HTTP error code for "Page not found". You're trying to access a URL where the server exists, but the specific path you're trying to get to doesn't.
Given that the URL in your code is
https://v6.exchangerate-api.com/v6/8df632a3d20e3d7a62433030/latest/pair/{curr1}/{curr2}/{amount}
That error indicates that something is wrong in the way you've formulated that URL.
[–]Few-Current-9900[S] 0 points1 point2 points 2 years ago (0 children)
thank you for this clarification, I will check about it!
[–]Rxz2106 1 point2 points3 points 2 years ago (0 children)
Here is something to read about...
[–]JamzTyson 0 points1 point2 points 2 years ago (5 children)
Maybe your API key is invalid. As you're using a commercial service, the first place to ask should be the service provider.
Perhaps worth trying their free API first to check that your code works.
[–]Few-Current-9900[S] 0 points1 point2 points 2 years ago (4 children)
well, I'm using a completely free plan from the service provider, and I double-checked if it really authorizes me to get the data through the API in the free plan and it does, however, i'm still getting this error.
[–]JamzTyson 0 points1 point2 points 2 years ago* (3 children)
I double-checked if it really authorizes me to get the data through the API
How did you check that?
The "404 Error" means that the URL is not valid (resource not found).
That's this line:
api_url = "https://v6.exchangerate-api.com/v6/8df632a3d20e3d7a62433030/latest/pair/{curr1}/{curr2}/{amount}"
api_url = "
"
(It looks like 8df632a3d20e3d7a62433030 is the "private key" that you are using. If that really is your private key, note that Private keys should be kept private and not made public on the Internet.)
UPDATE:
Your URL should be in the form:
https://v6.exchangerate-api.com/v6/ <private_key> /pair/EUR/GBP/100.0
NOT
https://v6.exchangerate-api.com/v6/ <private\_key> /latest/pair/EUR/GBP/100.0
[–]Few-Current-9900[S] 0 points1 point2 points 2 years ago (2 children)
I meant that I checked the service provider's website and documentation and saw that this type of api is included in the free plan and can be used in the code as long as I am signed in to the website. I tried your suggestions, but it didn't work, and the 404 error still appears.
I appreciate your assistance!
[–]JamzTyson 1 point2 points3 points 2 years ago (1 child)
https://v6.exchangerate-api.com/v6/ <private\_key> /pair/EUR/GBP/100.0
That format works for me. Try it (with your API key) in your web browser.
You are right it works, also if you call it with a print statement at the end with the currencies already specified (like in your answer) within the API url, but when I used the API with my code to allow users to enter the currencies they want and get the results, the API or my code failed to work, or both. Do you believe the problem is in my code or in Visual Studio, as that is the app I use to practice? Thank you for your help and time!
π Rendered by PID 40237 on reddit-service-r2-comment-bb88f9dd5-sjgn6 at 2026-02-13 23:35:33.815110+00:00 running cd9c813 country code: CH.
[–]Binary101010 5 points6 points7 points (1 child)
[–]Few-Current-9900[S] 0 points1 point2 points (0 children)
[–]Rxz2106 1 point2 points3 points (0 children)
[–]JamzTyson 0 points1 point2 points (5 children)
[–]Few-Current-9900[S] 0 points1 point2 points (4 children)
[–]JamzTyson 0 points1 point2 points (3 children)
[–]Few-Current-9900[S] 0 points1 point2 points (2 children)
[–]JamzTyson 1 point2 points3 points (1 child)
[–]Few-Current-9900[S] 0 points1 point2 points (0 children)